Spaces:
Runtime error
Runtime error
Commit
·
3c016be
1
Parent(s):
2fe6001
app accelerate
Browse files
app.py
CHANGED
@@ -34,8 +34,7 @@ def get_model():
|
|
34 |
)
|
35 |
logger.info(f"Tokenizer carregado em {time.time() - start_time:.2f} segundos.")
|
36 |
model = T5ForConditionalGeneration.from_pretrained(
|
37 |
-
"unicamp-dl/ptt5-small-portuguese-vocab"
|
38 |
-
device_map="cpu" # Força uso da CPU
|
39 |
)
|
40 |
logger.info(f"Modelo carregado em {time.time() - start_time:.2f} segundos.")
|
41 |
get_model.model_data = {"tokenizer": tokenizer, "model": model}
|
|
|
34 |
)
|
35 |
logger.info(f"Tokenizer carregado em {time.time() - start_time:.2f} segundos.")
|
36 |
model = T5ForConditionalGeneration.from_pretrained(
|
37 |
+
"unicamp-dl/ptt5-small-portuguese-vocab"
|
|
|
38 |
)
|
39 |
logger.info(f"Modelo carregado em {time.time() - start_time:.2f} segundos.")
|
40 |
get_model.model_data = {"tokenizer": tokenizer, "model": model}
|