mou3az commited on
Commit
509eb43
·
verified ·
1 Parent(s): 066adc9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -264,7 +264,7 @@ def Internet_Search(history, messages2):
264
  start_index = error_message.find("Input validation error:")
265
  end_index = error_message.find("and 4096 `max_new_tokens`")
266
  if start_index != -1 and end_index != -1:
267
- messages1.pop()
268
  raise gr.Error(error_message[start_index:end_index].strip()) from e
269
  else:
270
  raise gr.Error("Error occurred during response") from e
@@ -302,7 +302,7 @@ def Chart_Generator(history, messages3):
302
  start_index = error_message.find("Input validation error:")
303
  end_index = error_message.find("and 4096 `max_new_tokens`")
304
  if start_index != -1 and end_index != -1:
305
- messages1.pop()
306
  raise gr.Error(error_message[start_index:end_index].strip()) from e
307
  else:
308
  raise gr.Error("Error occurred during response") from e
@@ -327,7 +327,7 @@ def Chart_Generator(history, messages3):
327
  start_index = error_message.find("Input validation error:")
328
  end_index = error_message.find("and 4096 `max_new_tokens`")
329
  if start_index != -1 and end_index != -1:
330
- messages1.pop()
331
  raise gr.Error(error_message[start_index:end_index].strip()) from e
332
  else:
333
  raise gr.Error("Error occurred during response") from e
@@ -386,7 +386,7 @@ def Link_Scratch(history, messages4):
386
  start_index = error_message.find("Input validation error:")
387
  end_index = error_message.find("and 4096 `max_new_tokens`")
388
  if start_index != -1 and end_index != -1:
389
- messages1.pop()
390
  raise gr.Error(error_message[start_index:end_index].strip()) from e
391
  else:
392
  raise gr.Error("Error occurred during response") from e
@@ -455,7 +455,7 @@ def File_Interact(history, filepath, messages5):
455
  start_index = error_message.find("Input validation error:")
456
  end_index = error_message.find("and 4096 `max_new_tokens`")
457
  if start_index != -1 and end_index != -1:
458
- messages1.pop()
459
  raise gr.Error(error_message[start_index:end_index].strip()) from e
460
  else:
461
  raise gr.Error("Error occurred during response") from e
@@ -504,7 +504,7 @@ def Explore_WebSite(history, messages6):
504
  start_index = error_message.find("Input validation error:")
505
  end_index = error_message.find("and 4096 `max_new_tokens`")
506
  if start_index != -1 and end_index != -1:
507
- messages1.pop()
508
  raise gr.Error(error_message[start_index:end_index].strip()) from e
509
  else:
510
  raise gr.Error("Error occurred during response") from e
 
264
  start_index = error_message.find("Input validation error:")
265
  end_index = error_message.find("and 4096 `max_new_tokens`")
266
  if start_index != -1 and end_index != -1:
267
+ messages2.pop()
268
  raise gr.Error(error_message[start_index:end_index].strip()) from e
269
  else:
270
  raise gr.Error("Error occurred during response") from e
 
302
  start_index = error_message.find("Input validation error:")
303
  end_index = error_message.find("and 4096 `max_new_tokens`")
304
  if start_index != -1 and end_index != -1:
305
+ messages3.pop()
306
  raise gr.Error(error_message[start_index:end_index].strip()) from e
307
  else:
308
  raise gr.Error("Error occurred during response") from e
 
327
  start_index = error_message.find("Input validation error:")
328
  end_index = error_message.find("and 4096 `max_new_tokens`")
329
  if start_index != -1 and end_index != -1:
330
+ messages3.pop()
331
  raise gr.Error(error_message[start_index:end_index].strip()) from e
332
  else:
333
  raise gr.Error("Error occurred during response") from e
 
386
  start_index = error_message.find("Input validation error:")
387
  end_index = error_message.find("and 4096 `max_new_tokens`")
388
  if start_index != -1 and end_index != -1:
389
+ messages4.pop()
390
  raise gr.Error(error_message[start_index:end_index].strip()) from e
391
  else:
392
  raise gr.Error("Error occurred during response") from e
 
455
  start_index = error_message.find("Input validation error:")
456
  end_index = error_message.find("and 4096 `max_new_tokens`")
457
  if start_index != -1 and end_index != -1:
458
+ messages5.pop()
459
  raise gr.Error(error_message[start_index:end_index].strip()) from e
460
  else:
461
  raise gr.Error("Error occurred during response") from e
 
504
  start_index = error_message.find("Input validation error:")
505
  end_index = error_message.find("and 4096 `max_new_tokens`")
506
  if start_index != -1 and end_index != -1:
507
+ messages6.pop()
508
  raise gr.Error(error_message[start_index:end_index].strip()) from e
509
  else:
510
  raise gr.Error("Error occurred during response") from e