Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -28,13 +28,13 @@ Here is the relevant evidence from the database:
|
|
| 28 |
|
| 29 |
Answer this question based only on the evidence above:
|
| 30 |
{question}"""
|
| 31 |
-
|
| 32 |
-
response = client.
|
| 33 |
-
prompt,
|
| 34 |
model="mistralai/Mistral-7B-Instruct-v0.3",
|
| 35 |
-
|
| 36 |
)
|
| 37 |
-
return response
|
| 38 |
|
| 39 |
demo = gr.Interface(
|
| 40 |
fn=answer_question,
|
|
|
|
| 28 |
|
| 29 |
Answer this question based only on the evidence above:
|
| 30 |
{question}"""
|
| 31 |
+
|
| 32 |
+
response = client.chat_completion(
|
| 33 |
+
messages=[{"role": "user", "content": prompt}],
|
| 34 |
model="mistralai/Mistral-7B-Instruct-v0.3",
|
| 35 |
+
max_tokens=512
|
| 36 |
)
|
| 37 |
+
return response.choices[0].message.content
|
| 38 |
|
| 39 |
demo = gr.Interface(
|
| 40 |
fn=answer_question,
|