alexkueck commited on
Commit
d699d10
1 Parent(s): f43dcfb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -141,12 +141,12 @@ def clear_all():
141
  #History - die Frage oder das File eintragen...
142
  def add_text(chatbot, history, prompt, file):
143
  if (file == None):
144
- chatbot.append((prompt, None))
145
  else:
146
  if (prompt == ""):
147
- chatbot.append(((file.name,), "Prompt fehlt!"))
148
  else:
149
- chatbot.append(((file.name,), None), (prompt, None))
150
  print("chatbot nach add_text............")
151
  print(chatbot)
152
  return chatbot, history, prompt, "" #gr.Image( label=None, size=(30,30), visible=False, scale=1) #gr.Textbox(value="", interactive=False)
@@ -678,7 +678,7 @@ with gr.Blocks(css=customCSS, theme=small_and_beautiful_theme) as demo:
678
  inputs=[
679
  user_question,
680
  upload,
681
- chatbot_bild,
682
  history,
683
  rag_option,
684
  model_option,
 
141
  #History - die Frage oder das File eintragen...
142
  def add_text(chatbot, history, prompt, file):
143
  if (file == None):
144
+ chatbot = chatbot +[(prompt, None)]
145
  else:
146
  if (prompt == ""):
147
+ chatbot=chatbot + [((file.name,), "Prompt fehlt!")]
148
  else:
149
+ chatbot = chatbot +[((file.name,), None), (prompt, None)]
150
  print("chatbot nach add_text............")
151
  print(chatbot)
152
  return chatbot, history, prompt, "" #gr.Image( label=None, size=(30,30), visible=False, scale=1) #gr.Textbox(value="", interactive=False)
 
678
  inputs=[
679
  user_question,
680
  upload,
681
+ chatbot,
682
  history,
683
  rag_option,
684
  model_option,