Spaces:
Sleeping
Sleeping
PetrosStav
commited on
Commit
•
8102d33
1
Parent(s):
33a4992
Create download_model.py
Browse files- download_model.py +12 -0
download_model.py
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# download_model.py
|
2 |
+
from transformers import T5ForConditionalGeneration
|
3 |
+
import os
|
4 |
+
|
5 |
+
CACHE_DIR = "/app/src/citance_analysis/models_cache"
|
6 |
+
|
7 |
+
model = T5ForConditionalGeneration.from_pretrained(
|
8 |
+
"google/flan-t5-base",
|
9 |
+
cache_dir=CACHE_DIR,
|
10 |
+
torch_dtype="auto",
|
11 |
+
device_map="auto"
|
12 |
+
)
|