Update app.py
Browse files
app.py
CHANGED
|
@@ -33,13 +33,18 @@ warnings.filterwarnings("ignore")
|
|
| 33 |
print("Start")
|
| 34 |
import subprocess
|
| 35 |
|
| 36 |
-
subprocess
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 43 |
|
| 44 |
# ------------------------------
|
| 45 |
# Device and Embedding Setup (CPU optimized)
|
|
|
|
| 33 |
print("Start")
|
| 34 |
import subprocess
|
| 35 |
|
| 36 |
+
import subprocess
|
| 37 |
+
|
| 38 |
+
try:
|
| 39 |
+
subprocess.run([
|
| 40 |
+
"huggingface-cli", "download",
|
| 41 |
+
"microsoft/Phi-3-mini-4k-instruct-gguf",
|
| 42 |
+
"--local-dir", "./models",
|
| 43 |
+
"--local-dir-use-symlinks", "False"
|
| 44 |
+
], check=True)
|
| 45 |
+
except subprocess.CalledProcessError as e:
|
| 46 |
+
print("Error occurred:", e)
|
| 47 |
+
|
| 48 |
|
| 49 |
# ------------------------------
|
| 50 |
# Device and Embedding Setup (CPU optimized)
|