Update app.py
Browse files
app.py
CHANGED
@@ -284,27 +284,9 @@ with gr.Blocks():
|
|
284 |
fn=invoke,
|
285 |
chatbot = chatbot,
|
286 |
additional_inputs = additional_inputs,
|
287 |
-
outputs = [chatbot],
|
288 |
title = "Generative AI - LLM & RAG",
|
289 |
description = description)
|
290 |
|
291 |
-
with gr.Row():
|
292 |
-
txt = gr.Textbox(
|
293 |
-
scale=4,
|
294 |
-
show_label=False,
|
295 |
-
placeholder="Gibt Text ein und drücke Enter oder lade ein Bild hoch.",
|
296 |
-
container=False,
|
297 |
-
)
|
298 |
-
btn = gr.UploadButton("📁", file_types=["image", "video", "audio"])
|
299 |
-
|
300 |
-
txt_msg = txt.submit(add_text, [chatbot, txt], [chatbot, txt], queue=False).then(
|
301 |
-
invoke, chatbot, chatbot, api_name="bot_response"
|
302 |
-
)
|
303 |
-
txt_msg.then(lambda: gr.Textbox(interactive=True), None, [txt], queue=False)
|
304 |
-
file_msg = btn.upload(add_file, [chatbot, btn], [chatbot], queue=False).then(
|
305 |
-
invoke, chatbot, chatbot
|
306 |
-
)
|
307 |
-
|
308 |
demo.queue()
|
309 |
demo.launch()
|
310 |
|
|
|
284 |
fn=invoke,
|
285 |
chatbot = chatbot,
|
286 |
additional_inputs = additional_inputs,
|
|
|
287 |
title = "Generative AI - LLM & RAG",
|
288 |
description = description)
|
289 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
290 |
demo.queue()
|
291 |
demo.launch()
|
292 |
|