Update app.py
Browse files
app.py
CHANGED
|
@@ -424,12 +424,11 @@ def show_notification():
|
|
| 424 |
print("Funktion wurde aufgerufen")
|
| 425 |
return gr.Notification("System erfolgreich aktualisiert!", title="Fertig", type="info") #gr.Info("System erfolgreich aktualisiert!") #
|
| 426 |
"""
|
| 427 |
-
def
|
| 428 |
-
return gr.
|
| 429 |
-
|
| 430 |
-
|
| 431 |
-
|
| 432 |
-
return gr.update(visible=False)
|
| 433 |
|
| 434 |
########################################
|
| 435 |
# Bot- test gegen schädliche Bots die die Anwendung testen...
|
|
@@ -451,17 +450,7 @@ def custom_css():
|
|
| 451 |
color:#353535;
|
| 452 |
}
|
| 453 |
|
| 454 |
-
#
|
| 455 |
-
position: fixed;
|
| 456 |
-
top: 50%;
|
| 457 |
-
left: 50%;
|
| 458 |
-
transform: translate(-50%, -50%);
|
| 459 |
-
background-color: #f0f0f0;
|
| 460 |
-
padding: 20px;
|
| 461 |
-
border-radius: 10px;
|
| 462 |
-
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
| 463 |
-
z-index: 1000;
|
| 464 |
-
}
|
| 465 |
"""
|
| 466 |
|
| 467 |
|
|
@@ -671,8 +660,7 @@ with gr.Blocks(css=customCSS, theme=themeAlex) as demo:
|
|
| 671 |
renew_button.click(fn=upload_pdf, inputs=upload_pdf_files, outputs=[output_text, file_list]).then(
|
| 672 |
fn=update_vectorstore, inputs=None, outputs=output_text).then(
|
| 673 |
fn=reset_file_input, inputs=None, outputs=upload_pdf_files).success(
|
| 674 |
-
fn=
|
| 675 |
-
)
|
| 676 |
|
| 677 |
#fn= show_notification, inputs=None) #lambda: gr.Notification("System-Aktualisierung erfolgreich abgeschlossen!"
|
| 678 |
demo.load(display_files, outputs=file_list)
|
|
|
|
| 424 |
print("Funktion wurde aufgerufen")
|
| 425 |
return gr.Notification("System erfolgreich aktualisiert!", title="Fertig", type="info") #gr.Info("System erfolgreich aktualisiert!") #
|
| 426 |
"""
|
| 427 |
+
def show_success():
|
| 428 |
+
return gr.Info(
|
| 429 |
+
"System erfolgreich aktualisiert!",
|
| 430 |
+
headline="Erfolg!",
|
| 431 |
+
elem_id="custom-info"), gr.Textbox(visible = False)
|
|
|
|
| 432 |
|
| 433 |
########################################
|
| 434 |
# Bot- test gegen schädliche Bots die die Anwendung testen...
|
|
|
|
| 450 |
color:#353535;
|
| 451 |
}
|
| 452 |
|
| 453 |
+
#custom-info {font-size: 24px !important; color: green !important;}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 454 |
"""
|
| 455 |
|
| 456 |
|
|
|
|
| 660 |
renew_button.click(fn=upload_pdf, inputs=upload_pdf_files, outputs=[output_text, file_list]).then(
|
| 661 |
fn=update_vectorstore, inputs=None, outputs=output_text).then(
|
| 662 |
fn=reset_file_input, inputs=None, outputs=upload_pdf_files).success(
|
| 663 |
+
fn=show_success, input=None, output=output_text)
|
|
|
|
| 664 |
|
| 665 |
#fn= show_notification, inputs=None) #lambda: gr.Notification("System-Aktualisierung erfolgreich abgeschlossen!"
|
| 666 |
demo.load(display_files, outputs=file_list)
|