PetrosStav commited on
Commit
4b09b8b
1 Parent(s): 8df0fcc

Create download_model.py

Browse files
Files changed (1) hide show
  1. 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
+ )