Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -9,6 +9,7 @@ app = FastAPI()
|
|
| 9 |
MODEL_REPO = "Qwen/Qwen2.5-3B-Instruct-GGUF"
|
| 10 |
MODEL_FILE = "qwen2.5-3b-instruct-q4_k_m.gguf"
|
| 11 |
|
|
|
|
| 12 |
if not os.path.exists(MODEL_FILE):
|
| 13 |
print(f"Downloading {MODEL_FILE} from {MODEL_REPO}...")
|
| 14 |
hf_hub_download(repo_id=MODEL_REPO, filename=MODEL_FILE, local_dir=".")
|
|
|
|
| 9 |
MODEL_REPO = "Qwen/Qwen2.5-3B-Instruct-GGUF"
|
| 10 |
MODEL_FILE = "qwen2.5-3b-instruct-q4_k_m.gguf"
|
| 11 |
|
| 12 |
+
# Tải model nếu chưa có (tự động làm sau khi build, không tốn RAM build)
|
| 13 |
if not os.path.exists(MODEL_FILE):
|
| 14 |
print(f"Downloading {MODEL_FILE} from {MODEL_REPO}...")
|
| 15 |
hf_hub_download(repo_id=MODEL_REPO, filename=MODEL_FILE, local_dir=".")
|