alexkueck commited on
Commit
34690ad
1 Parent(s): 0d7202b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -441,8 +441,12 @@ def invoke (prompt, file, history, rag_option, model_option, openai_api_key, k=3
441
  history[-1][1] = "Hallo" #file.name #image
442
  print("history zeichnen......................")
443
  print(history)
444
- return history, "Stop: Success"
445
- break
 
 
 
 
446
  else:
447
  #Antwort als Stream ausgeben... wenn Textantwort gefordert
448
  print("history vor Zusatz...........")
 
441
  history[-1][1] = "Hallo" #file.name #image
442
  print("history zeichnen......................")
443
  print(history)
444
+ if shared_state.interrupted:
445
+ shared_state.recover()
446
+ try:
447
+ return history, "Stop: Success"
448
+ except:
449
+ pass
450
  else:
451
  #Antwort als Stream ausgeben... wenn Textantwort gefordert
452
  print("history vor Zusatz...........")