Hjgugugjhuhjggg commited on
Commit
e72c053
verified
1 Parent(s): abecee2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
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
- with tqdm(unit="B", unit_scale=True, desc=f"Downloading {model_name}") as t:
77
- model = AutoModelForCausalLM.from_pretrained(model_name, use_auth_token=HUGGINGFACE_HUB_TOKEN, _tqdm=t)
78
- tokenizer = AutoTokenizer.from_pretrained(model_name, use_auth_token=HUGGINGFACE_HUB_TOKEN)
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: