Spaces:
Runtime error
Runtime error
update4
Browse files
app.py
CHANGED
@@ -1,8 +1,15 @@
|
|
1 |
import gradio as gr
|
2 |
from llama_cpp import Llama
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
|
4 |
# Load the GGUF model
|
5 |
-
model_path = "model.gguf" # Ensure this matches your uploaded file name
|
6 |
llm = Llama(model_path=model_path)
|
7 |
|
8 |
# Define the chatbot function
|
|
|
1 |
import gradio as gr
|
2 |
from llama_cpp import Llama
|
3 |
+
from huggingface_hub import hf_hub_download
|
4 |
+
|
5 |
+
# Fetch the model file from Hugging Face Hub
|
6 |
+
model_repo = "SupermanRX/moderateTherapistModel" # Replace with your repo name
|
7 |
+
model_file = "model.gguf" # Replace with your GGUF model file name in the repo
|
8 |
+
|
9 |
+
# Download the model file to the local environment
|
10 |
+
model_path = hf_hub_download(repo_id=model_repo, filename=model_file)
|
11 |
|
12 |
# Load the GGUF model
|
|
|
13 |
llm = Llama(model_path=model_path)
|
14 |
|
15 |
# Define the chatbot function
|