mikemin027 commited on
Commit
9c253fd
·
verified ·
1 Parent(s): fd63c99

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -1,9 +1,8 @@
1
  import gradio as gr
2
  from llama_cpp import Llama
3
 
4
- # Provide the absolute path to the first shard of your model
5
- # Replace "/full/path/to" with the actual absolute path to your model directory
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 the output structure
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