Update app.py
Browse files
app.py
CHANGED
@@ -628,9 +628,9 @@ with gr.Blocks(css=customCSS, theme=themeAlex) as demo:
|
|
628 |
# Automatisches Ausführen der Upload-Funktion, wenn eine Datei hochgeladen wird
|
629 |
#upload_pdf_file.change(fn=upload_pdf, inputs=upload_pdf_file, outputs=output_text)
|
630 |
#upload_pdf_files.change(fn=upload_pdf, inputs=upload_pdf_files, outputs=[output_text, file_list]) #, postprocess=display_files)
|
631 |
-
renew_button.click(fn=upload_pdf, inputs=upload_pdf_files, outputs=[output_text, file_list])
|
632 |
#gr.HTML(update=display_files, elem_id="file_list", show_label=False)
|
633 |
-
demo.load(display_files, outputs=file_list)
|
634 |
|
635 |
|
636 |
"""
|
@@ -691,18 +691,21 @@ with gr.Blocks(css=customCSS, theme=themeAlex) as demo:
|
|
691 |
# Event-Handler für die Validierung
|
692 |
#validate_btn.click(validate_input, inputs=[user_input_validate, validate], outputs=[status_display, validate, user_input_validate, validate_btn])
|
693 |
#user_input_validate.submit(validate_input, inputs=[user_input_validate, validate], outputs=[status_display, validate, user_input_validate, validate_btn])
|
694 |
-
|
|
|
695 |
predict_event1 = user_input.submit(**transfer_input_args, queue=False,).then(**predict_args)
|
696 |
predict_event2 = submitBtn.click(**transfer_input_args, queue=False,).then(**predict_args)
|
697 |
predict_event3 = upload.upload(file_anzeigen, [upload], [image_display, image_display, attached_file] ) #.then(**predict_args)
|
698 |
emptyBtn.click(clear_all, [history, uploaded_file_paths, chats], [attached_file, image_display, uploaded_file_paths, history, file_download, chats])
|
699 |
#Bild Anzeige neben dem Button wieder entfernen oder austauschen..
|
700 |
image_display.select(file_loeschen, [], [attached_file, image_display])
|
701 |
-
#download_button.click(fn=download_chats, inputs=chat_selector, outputs=[file_download])
|
702 |
-
|
703 |
-
|
704 |
#Berechnung oder Ausgabe anhalten (kann danach fortgesetzt werden)
|
705 |
cancelBtn.click(cancel_outputing, [], [status_display], cancels=[predict_event1,predict_event2, predict_event3])
|
|
|
|
|
|
|
|
|
|
|
706 |
|
707 |
demo.title = "KKG-ChatBot"
|
708 |
demo.queue(default_concurrency_limit=15).launch(debug=True)
|
|
|
628 |
# Automatisches Ausführen der Upload-Funktion, wenn eine Datei hochgeladen wird
|
629 |
#upload_pdf_file.change(fn=upload_pdf, inputs=upload_pdf_file, outputs=output_text)
|
630 |
#upload_pdf_files.change(fn=upload_pdf, inputs=upload_pdf_files, outputs=[output_text, file_list]) #, postprocess=display_files)
|
631 |
+
#renew_button.click(fn=upload_pdf, inputs=upload_pdf_files, outputs=[output_text, file_list])
|
632 |
#gr.HTML(update=display_files, elem_id="file_list", show_label=False)
|
633 |
+
#demo.load(display_files, outputs=file_list)
|
634 |
|
635 |
|
636 |
"""
|
|
|
691 |
# Event-Handler für die Validierung
|
692 |
#validate_btn.click(validate_input, inputs=[user_input_validate, validate], outputs=[status_display, validate, user_input_validate, validate_btn])
|
693 |
#user_input_validate.submit(validate_input, inputs=[user_input_validate, validate], outputs=[status_display, validate, user_input_validate, validate_btn])
|
694 |
+
#############################################
|
695 |
+
#1ter Tab
|
696 |
predict_event1 = user_input.submit(**transfer_input_args, queue=False,).then(**predict_args)
|
697 |
predict_event2 = submitBtn.click(**transfer_input_args, queue=False,).then(**predict_args)
|
698 |
predict_event3 = upload.upload(file_anzeigen, [upload], [image_display, image_display, attached_file] ) #.then(**predict_args)
|
699 |
emptyBtn.click(clear_all, [history, uploaded_file_paths, chats], [attached_file, image_display, uploaded_file_paths, history, file_download, chats])
|
700 |
#Bild Anzeige neben dem Button wieder entfernen oder austauschen..
|
701 |
image_display.select(file_loeschen, [], [attached_file, image_display])
|
|
|
|
|
|
|
702 |
#Berechnung oder Ausgabe anhalten (kann danach fortgesetzt werden)
|
703 |
cancelBtn.click(cancel_outputing, [], [status_display], cancels=[predict_event1,predict_event2, predict_event3])
|
704 |
+
############################################
|
705 |
+
#2ter Tab
|
706 |
+
renew_button.click(fn=upload_pdf, inputs=upload_pdf_files, outputs=[output_text, file_list])
|
707 |
+
#gr.HTML(update=display_files, elem_id="file_list", show_label=False)
|
708 |
+
demo.load(display_files, outputs=file_list)
|
709 |
|
710 |
demo.title = "KKG-ChatBot"
|
711 |
demo.queue(default_concurrency_limit=15).launch(debug=True)
|