Update app.py
Browse files
app.py
CHANGED
@@ -21,7 +21,7 @@ def respond(
|
|
21 |
top_p,
|
22 |
):
|
23 |
if not message:
|
24 |
-
return
|
25 |
|
26 |
messages = [{"role": "system", "content": system_message}]
|
27 |
|
@@ -45,9 +45,9 @@ def respond(
|
|
45 |
):
|
46 |
token = message.token.text
|
47 |
response += token
|
48 |
-
yield response
|
49 |
except Exception as e:
|
50 |
-
yield f"An error occurred: {str(e)}"
|
51 |
|
52 |
def update_textbox(prompt):
|
53 |
return gr.update(value=prompt)
|
|
|
21 |
top_p,
|
22 |
):
|
23 |
if not message:
|
24 |
+
return []
|
25 |
|
26 |
messages = [{"role": "system", "content": system_message}]
|
27 |
|
|
|
45 |
):
|
46 |
token = message.token.text
|
47 |
response += token
|
48 |
+
yield [(message, response)]
|
49 |
except Exception as e:
|
50 |
+
yield [(message, f"An error occurred: {str(e)}")]
|
51 |
|
52 |
def update_textbox(prompt):
|
53 |
return gr.update(value=prompt)
|