Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -3,14 +3,11 @@ from huggingface_hub.utils import HfHubHTTPError
|
|
3 |
|
4 |
def predict(message, history):
|
5 |
try:
|
6 |
-
#
|
7 |
chat_interface = gr.ChatInterface.load("models/meta-llama/Meta-Llama-3.1-8B")
|
8 |
-
|
9 |
-
# Get the prediction function
|
10 |
-
fn = chat_interface.predict
|
11 |
|
12 |
-
#
|
13 |
-
response =
|
14 |
history.append((message, response))
|
15 |
return "", history
|
16 |
|
|
|
3 |
|
4 |
def predict(message, history):
|
5 |
try:
|
6 |
+
# Define the model interface directly using the load method
|
7 |
chat_interface = gr.ChatInterface.load("models/meta-llama/Meta-Llama-3.1-8B")
|
|
|
|
|
|
|
8 |
|
9 |
+
# Use the interface to get predictions
|
10 |
+
response = chat_interface(message, history)
|
11 |
history.append((message, response))
|
12 |
return "", history
|
13 |
|