Spaces:
Paused
Paused
Commit
·
c8f46a9
1
Parent(s):
cbb7bf7
Added Progressbar
Browse files- main/api.py +5 -2
main/api.py
CHANGED
@@ -58,8 +58,11 @@ class LLMApi:
|
|
58 |
model_path = self.models_path / model_name.split('/')[-1]
|
59 |
|
60 |
# Download and save model
|
61 |
-
model
|
62 |
-
|
|
|
|
|
|
|
63 |
|
64 |
self.logger.info(f"Saving model to {model_path}")
|
65 |
model.save_pretrained(model_path)
|
|
|
58 |
model_path = self.models_path / model_name.split('/')[-1]
|
59 |
|
60 |
# Download and save model
|
61 |
+
self.logger.info(f"Downloading model: {model_name}")
|
62 |
+
model = AutoModelForCausalLM.from_pretrained(model_name, progress_bar=True)
|
63 |
+
|
64 |
+
self.logger.info(f"Downloading tokenizer for model: {model_name}")
|
65 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name, progress_bar=True)
|
66 |
|
67 |
self.logger.info(f"Saving model to {model_path}")
|
68 |
model.save_pretrained(model_path)
|