Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -6,10 +6,10 @@ from docx import Document
|
|
6 |
|
7 |
# ✅ Define model URL and path
|
8 |
MODEL_URL = "https://huggingface.co/TheBloke/CapybaraHermes-2.5-Mistral-7B-GGUF/resolve/main/capybarahermes-2.5-mistral-7b.Q5_K_M.gguf"
|
9 |
-
MODEL_DIR = "/
|
10 |
MODEL_PATH = os.path.join(MODEL_DIR, "mistral-7b.Q5_K_M.gguf")
|
11 |
|
12 |
-
# ✅ Ensure models directory exists
|
13 |
os.makedirs(MODEL_DIR, exist_ok=True)
|
14 |
|
15 |
# ✅ Download model if not already available
|
|
|
6 |
|
7 |
# ✅ Define model URL and path
|
8 |
MODEL_URL = "https://huggingface.co/TheBloke/CapybaraHermes-2.5-Mistral-7B-GGUF/resolve/main/capybarahermes-2.5-mistral-7b.Q5_K_M.gguf"
|
9 |
+
MODEL_DIR = "/tmp/models" # ✅ Change directory to `/tmp`
|
10 |
MODEL_PATH = os.path.join(MODEL_DIR, "mistral-7b.Q5_K_M.gguf")
|
11 |
|
12 |
+
# ✅ Ensure models directory exists (Using `/tmp` which is writable)
|
13 |
os.makedirs(MODEL_DIR, exist_ok=True)
|
14 |
|
15 |
# ✅ Download model if not already available
|