Spaces:
Build error
Build error
Commit ·
edd09a2
1
Parent(s): e41537b
interface update
Browse files
app.py
CHANGED
|
@@ -25,12 +25,12 @@ def respond(
|
|
| 25 |
if val[1]:
|
| 26 |
messages.append({"role": "assistant", "content": val[1]})
|
| 27 |
|
| 28 |
-
messages.append({"role": "user", "content": message})
|
| 29 |
|
| 30 |
-
response = ""
|
| 31 |
|
| 32 |
for message in client.chat_completion(
|
| 33 |
-
|
| 34 |
messages,
|
| 35 |
max_tokens=max_tokens,
|
| 36 |
stream=True,
|
|
@@ -47,7 +47,7 @@ def respond(
|
|
| 47 |
For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
|
| 48 |
"""
|
| 49 |
demo = gr.ChatInterface(
|
| 50 |
-
|
| 51 |
respond,
|
| 52 |
additional_inputs=[
|
| 53 |
gr.Textbox(value="You are a friendly Chatbot.", label="System message"),
|
|
|
|
| 25 |
if val[1]:
|
| 26 |
messages.append({"role": "assistant", "content": val[1]})
|
| 27 |
|
| 28 |
+
messages.append({"role": "user", "content": message + title})
|
| 29 |
|
| 30 |
+
response = title + ""
|
| 31 |
|
| 32 |
for message in client.chat_completion(
|
| 33 |
+
|
| 34 |
messages,
|
| 35 |
max_tokens=max_tokens,
|
| 36 |
stream=True,
|
|
|
|
| 47 |
For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
|
| 48 |
"""
|
| 49 |
demo = gr.ChatInterface(
|
| 50 |
+
|
| 51 |
respond,
|
| 52 |
additional_inputs=[
|
| 53 |
gr.Textbox(value="You are a friendly Chatbot.", label="System message"),
|