Update app.py
Browse files
app.py
CHANGED
@@ -212,12 +212,9 @@ def Chat_Message(history):
|
|
212 |
if len(messages1) >= 8:
|
213 |
messages1 = messages1[-8:]
|
214 |
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
history[-1][1] += word + " "
|
219 |
-
time.sleep(0.0025)
|
220 |
-
yield history
|
221 |
|
222 |
def Web_Search(history):
|
223 |
global messages2
|
@@ -248,12 +245,9 @@ def Web_Search(history):
|
|
248 |
if len(messages2) >= 8:
|
249 |
messages2 = messages2[-8:]
|
250 |
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
history[-1][1] += word + " "
|
255 |
-
time.sleep(0.0025)
|
256 |
-
yield history
|
257 |
|
258 |
def Chart_Generator(history):
|
259 |
global messages3
|
@@ -293,12 +287,9 @@ def Chart_Generator(history):
|
|
293 |
|
294 |
combined_content=response.content
|
295 |
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
history[-1][1] += word + " "
|
300 |
-
time.sleep(0.0025)
|
301 |
-
yield history
|
302 |
|
303 |
def Link_Scratch(history):
|
304 |
global messages4
|
@@ -342,12 +333,9 @@ def Link_Scratch(history):
|
|
342 |
|
343 |
response_message = response.content
|
344 |
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
history[-1][1] += word + " "
|
349 |
-
time.sleep(0.0025)
|
350 |
-
yield history
|
351 |
|
352 |
def insert_line_breaks(text, every=8):
|
353 |
return '\n'.join(text[i:i+every] for i in range(0, len(text), every))
|
@@ -401,12 +389,9 @@ def File_Interact(history,filepath):
|
|
401 |
|
402 |
response_message = response.content
|
403 |
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
history[-1][1] += word + " "
|
408 |
-
time.sleep(0.0025)
|
409 |
-
yield history
|
410 |
|
411 |
with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
412 |
with gr.Row():
|
|
|
212 |
if len(messages1) >= 8:
|
213 |
messages1 = messages1[-8:]
|
214 |
|
215 |
+
history[-1][1] += response.content
|
216 |
+
|
217 |
+
return history
|
|
|
|
|
|
|
218 |
|
219 |
def Web_Search(history):
|
220 |
global messages2
|
|
|
245 |
if len(messages2) >= 8:
|
246 |
messages2 = messages2[-8:]
|
247 |
|
248 |
+
history[-1][1] += response.content
|
249 |
+
|
250 |
+
return history
|
|
|
|
|
|
|
251 |
|
252 |
def Chart_Generator(history):
|
253 |
global messages3
|
|
|
287 |
|
288 |
combined_content=response.content
|
289 |
|
290 |
+
history[-1][1] += combined_content
|
291 |
+
|
292 |
+
return history
|
|
|
|
|
|
|
293 |
|
294 |
def Link_Scratch(history):
|
295 |
global messages4
|
|
|
333 |
|
334 |
response_message = response.content
|
335 |
|
336 |
+
history[-1][1] += response_message
|
337 |
+
|
338 |
+
return history
|
|
|
|
|
|
|
339 |
|
340 |
def insert_line_breaks(text, every=8):
|
341 |
return '\n'.join(text[i:i+every] for i in range(0, len(text), every))
|
|
|
389 |
|
390 |
response_message = response.content
|
391 |
|
392 |
+
history[-1][1] += response_message
|
393 |
+
|
394 |
+
return history
|
|
|
|
|
|
|
395 |
|
396 |
with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
397 |
with gr.Row():
|