Spaces:
Sleeping
Sleeping
Hjgugugjhuhjggg
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -15,7 +15,6 @@ from transformers import (
|
|
15 |
import boto3
|
16 |
import torch
|
17 |
import uvicorn
|
18 |
-
from tqdm import tqdm
|
19 |
|
20 |
# Configuraci贸n de logging
|
21 |
logging.basicConfig(level=logging.INFO, format="%(asctime)s - %(levelname)s - %(message)s")
|
@@ -73,9 +72,9 @@ class S3ModelLoader:
|
|
73 |
|
74 |
async def download_and_save_model_from_huggingface(self, model_name):
|
75 |
try:
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
self.upload_model_to_s3(model_name, model, tokenizer)
|
80 |
return model, tokenizer
|
81 |
except Exception as e:
|
|
|
15 |
import boto3
|
16 |
import torch
|
17 |
import uvicorn
|
|
|
18 |
|
19 |
# Configuraci贸n de logging
|
20 |
logging.basicConfig(level=logging.INFO, format="%(asctime)s - %(levelname)s - %(message)s")
|
|
|
72 |
|
73 |
async def download_and_save_model_from_huggingface(self, model_name):
|
74 |
try:
|
75 |
+
# Eliminado tqdm para descargar sin mostrar progreso
|
76 |
+
model = AutoModelForCausalLM.from_pretrained(model_name, use_auth_token=HUGGINGFACE_HUB_TOKEN)
|
77 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name, use_auth_token=HUGGINGFACE_HUB_TOKEN)
|
78 |
self.upload_model_to_s3(model_name, model, tokenizer)
|
79 |
return model, tokenizer
|
80 |
except Exception as e:
|