PetrosStav's picture
Create download_model.py
4b09b8b verified
# download_model.py
from transformers import T5ForConditionalGeneration
import os
CACHE_DIR = "/app/src/citance_analysis/models_cache"
model = T5ForConditionalGeneration.from_pretrained(
"google/flan-t5-base",
cache_dir=CACHE_DIR,
torch_dtype="auto",
device_map="auto"
)