yonikremer
commited on
Commit
•
6fb939f
1
Parent(s):
b263171
disabled progress bars
Browse files- on_server_start.py +13 -1
- requirements.txt +1 -2
on_server_start.py
CHANGED
@@ -4,6 +4,14 @@ A script that is run when the server starts.
|
|
4 |
from download_repo import download_repository
|
5 |
|
6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
def download_useful_models():
|
8 |
"""
|
9 |
Downloads the models that are useful for this project.
|
@@ -14,10 +22,14 @@ def download_useful_models():
|
|
14 |
"facebook/opt-125m",
|
15 |
)
|
16 |
for model_name in useful_models:
|
17 |
-
download_repository(
|
|
|
|
|
|
|
18 |
|
19 |
|
20 |
def main():
|
|
|
21 |
download_useful_models()
|
22 |
|
23 |
|
|
|
4 |
from download_repo import download_repository
|
5 |
|
6 |
|
7 |
+
def disable_progress_bar():
|
8 |
+
"""
|
9 |
+
Disables the progress bar when downloading models.
|
10 |
+
"""
|
11 |
+
import transformers
|
12 |
+
transformers.logging.disable_progress_bar()
|
13 |
+
|
14 |
+
|
15 |
def download_useful_models():
|
16 |
"""
|
17 |
Downloads the models that are useful for this project.
|
|
|
22 |
"facebook/opt-125m",
|
23 |
)
|
24 |
for model_name in useful_models:
|
25 |
+
download_repository(
|
26 |
+
model_name,
|
27 |
+
|
28 |
+
)
|
29 |
|
30 |
|
31 |
def main():
|
32 |
+
disable_progress_bar()
|
33 |
download_useful_models()
|
34 |
|
35 |
|
requirements.txt
CHANGED
@@ -10,5 +10,4 @@ accelerate
|
|
10 |
bitsandbytes
|
11 |
pytest~=7.1.2
|
12 |
sentencepiece
|
13 |
-
google-api-python-client
|
14 |
-
tqdm==4.64.1
|
|
|
10 |
bitsandbytes
|
11 |
pytest~=7.1.2
|
12 |
sentencepiece
|
13 |
+
google-api-python-client
|
|