Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -22,7 +22,7 @@ def get_mistral_response(user_input: str, history: list[tuple[str, str]], contex
|
|
22 |
messages=[ChatMessage(role='user', content=f'''CONTEXT:{context_with_history} QUESTION: {user_input}''')]
|
23 |
).choices[0].message.content
|
24 |
|
25 |
-
response = f"""**Before fine-tune**: <br> {response_before} <br><br
|
26 |
return response
|
27 |
|
28 |
|
@@ -31,7 +31,7 @@ demo = gr.ChatInterface(
|
|
31 |
title='no-nonsense QA bot',
|
32 |
description="After fine-tuning, the bot answers your question with a grounded citation. Paste your contextual information in the box below.",
|
33 |
additional_inputs=[
|
34 |
-
gr.Textbox(value="", label="Answer will be based on the context input here", lines=
|
35 |
],
|
36 |
additional_inputs_accordion = gr.Accordion(label="", open=True),
|
37 |
)
|
|
|
22 |
messages=[ChatMessage(role='user', content=f'''CONTEXT:{context_with_history} QUESTION: {user_input}''')]
|
23 |
).choices[0].message.content
|
24 |
|
25 |
+
response = f"""**Before fine-tune**: <br> {response_before} <br><br> **After fine-tune**:<br><span style="color:green"> {response_after} </span><br>"""
|
26 |
return response
|
27 |
|
28 |
|
|
|
31 |
title='no-nonsense QA bot',
|
32 |
description="After fine-tuning, the bot answers your question with a grounded citation. Paste your contextual information in the box below.",
|
33 |
additional_inputs=[
|
34 |
+
gr.Textbox(value="", label="Answer will be based on the context input here", lines=5),
|
35 |
],
|
36 |
additional_inputs_accordion = gr.Accordion(label="", open=True),
|
37 |
)
|