Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,14 +1,4 @@
|
|
1 |
-
import time
|
2 |
-
import gradio as gr
|
3 |
-
from openai import OpenAI
|
4 |
-
import os
|
5 |
import subprocess
|
6 |
-
from huggingface_hub import snapshot_download
|
7 |
-
|
8 |
-
# Model configuration
|
9 |
-
MODEL_ID = "deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B"
|
10 |
-
QUANT = "Q5_K_M"
|
11 |
-
|
12 |
# Utility functions
|
13 |
def run_command(command, cwd=None):
|
14 |
"""Run a system command."""
|
@@ -21,6 +11,19 @@ def run_command(command, cwd=None):
|
|
21 |
print(f"Command succeeded: {command}")
|
22 |
print(result.stdout)
|
23 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
def setup_llama_cpp():
|
25 |
"""Clone and compile llama.cpp repository."""
|
26 |
if not os.path.exists('llama.cpp'):
|
|
|
|
|
|
|
|
|
|
|
1 |
import subprocess
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
# Utility functions
|
3 |
def run_command(command, cwd=None):
|
4 |
"""Run a system command."""
|
|
|
11 |
print(f"Command succeeded: {command}")
|
12 |
print(result.stdout)
|
13 |
|
14 |
+
run_command('pip install openai')
|
15 |
+
|
16 |
+
import time
|
17 |
+
import gradio as gr
|
18 |
+
from openai import OpenAI
|
19 |
+
import os
|
20 |
+
from huggingface_hub import snapshot_download
|
21 |
+
|
22 |
+
# Model configuration
|
23 |
+
MODEL_ID = "deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B"
|
24 |
+
QUANT = "Q5_K_M"
|
25 |
+
|
26 |
+
|
27 |
def setup_llama_cpp():
|
28 |
"""Clone and compile llama.cpp repository."""
|
29 |
if not os.path.exists('llama.cpp'):
|