From 219366342b69438dc1f35a8acb348426247f9ef9 Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Fri, 10 Feb 2023 15:40:03 -0300 Subject: [PATCH] Sort imports according to PEP8 (based on #67) --- download-model.py | 14 +++++++------- server.py | 32 ++++++++++++++++++-------------- 2 files changed, 25 insertions(+), 21 deletions(-) diff --git a/download-model.py b/download-model.py index 49b20eb3..90711884 100644 --- a/download-model.py +++ b/download-model.py @@ -5,15 +5,15 @@ Example: python download-model.py facebook/opt-1.3b ''' - -import requests -from bs4 import BeautifulSoup -import multiprocessing -import tqdm -import sys import argparse -from pathlib import Path +import multiprocessing import re +import sys +from pathlib import Path + +import requests +import tqdm +from bs4 import BeautifulSoup parser = argparse.ArgumentParser() parser.add_argument('MODEL', type=str) diff --git a/server.py b/server.py index 5c68f67c..27b42028 100644 --- a/server.py +++ b/server.py @@ -1,26 +1,30 @@ -import re -import gc -import time -import glob -import torch import argparse -import json -import io import base64 -import sys +import copy +import gc +import glob +import io +import json import os +import re +import sys +import time +import warnings from datetime import datetime from pathlib import Path -from PIL import Image -import copy + import gradio as gr -import warnings -from tqdm import tqdm +import torch import transformers -from transformers import AutoTokenizer, AutoModelForCausalLM, AutoConfig +from PIL import Image +from tqdm import tqdm +from transformers import AutoConfig +from transformers import AutoModelForCausalLM +from transformers import AutoTokenizer + from modules.html_generator import * -from modules.ui import * from modules.stopping_criteria import _SentinelTokenStoppingCriteria +from modules.ui import * transformers.logging.set_verbosity_error()