Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,9 +1,8 @@
|
|
1 |
import gradio as gr
|
2 |
from llama_cpp import Llama
|
3 |
|
4 |
-
# Provide the
|
5 |
-
|
6 |
-
model_path = "/home/user/app/DeepSeek-R1-Zero-Q4_K_M/DeepSeek-R1-Zero-Q4_K_M-00001-of-00009.gguf"
|
7 |
|
8 |
# Initialize the model
|
9 |
try:
|
@@ -17,7 +16,7 @@ def predict(prompt):
|
|
17 |
try:
|
18 |
# Generate output using the model
|
19 |
output = model(prompt)
|
20 |
-
return output["choices"][0]["text"] # Adjust based on
|
21 |
except Exception as e:
|
22 |
return f"Error during inference: {e}"
|
23 |
|
|
|
1 |
import gradio as gr
|
2 |
from llama_cpp import Llama
|
3 |
|
4 |
+
# Provide the relative path to the first shard of your model
|
5 |
+
model_path = "DeepSeek-R1-Zero-Q4_K_M/DeepSeek-R1-Zero-Q4_K_M-00001-of-00009.gguf"
|
|
|
6 |
|
7 |
# Initialize the model
|
8 |
try:
|
|
|
16 |
try:
|
17 |
# Generate output using the model
|
18 |
output = model(prompt)
|
19 |
+
return output["choices"][0]["text"] # Adjust this based on output structure
|
20 |
except Exception as e:
|
21 |
return f"Error during inference: {e}"
|
22 |
|