Update app.py
Browse files
app.py
CHANGED
@@ -129,12 +129,11 @@ with gr.Blocks() as demo:
|
|
129 |
}
|
130 |
|
131 |
outputs = requests.post(API_URL, headers=HEADERS, data=json.dumps(data)).json()['choices'][0]['text']
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
yield history
|
138 |
|
139 |
msg.submit(user, [msg, chatbot], [msg, chatbot], queue=False).then(
|
140 |
fn=bot,
|
|
|
129 |
}
|
130 |
|
131 |
outputs = requests.post(API_URL, headers=HEADERS, data=json.dumps(data)).json()['choices'][0]['text']
|
132 |
+
if history[-1][1] is None:
|
133 |
+
history[-1][1] = segment
|
134 |
+
else:
|
135 |
+
history[-1][1] += outputs
|
136 |
+
return history
|
|
|
137 |
|
138 |
msg.submit(user, [msg, chatbot], [msg, chatbot], queue=False).then(
|
139 |
fn=bot,
|