Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -87,10 +87,10 @@ def respond(message, history):
|
|
| 87 |
# Send the conversation to the Mistral model via Hugging Face
|
| 88 |
# max_tokens=300 limits how long the reply can be
|
| 89 |
try:
|
| 90 |
-
|
| 91 |
-
|
| 92 |
except Exception as e:
|
| 93 |
-
|
| 94 |
|
| 95 |
|
| 96 |
# Extract the first reply from the model's response
|
|
|
|
| 87 |
# Send the conversation to the Mistral model via Hugging Face
|
| 88 |
# max_tokens=300 limits how long the reply can be
|
| 89 |
try:
|
| 90 |
+
response = client.chat_completion(messages, max_tokens=300)
|
| 91 |
+
print(response)
|
| 92 |
except Exception as e:
|
| 93 |
+
print("ERROR:", e)
|
| 94 |
|
| 95 |
|
| 96 |
# Extract the first reply from the model's response
|