Update app.py
Browse files
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
|
| 145 |
else:
|
| 146 |
if (prompt == ""):
|
| 147 |
-
chatbot
|
| 148 |
else:
|
| 149 |
-
chatbot
|
| 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 |
-
|
| 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,
|