Update app.py
Browse files
app.py
CHANGED
|
@@ -444,9 +444,11 @@ def show_text_status(status):
|
|
| 444 |
def validate_input(user_input_validate, validate=False):
|
| 445 |
user_input_hashed = hash_input(user_input_validate)
|
| 446 |
if user_input_hashed == hash_input(ANTI_BOT_PW):
|
| 447 |
-
return "Richtig! Weiter gehts...", gr.
|
| 448 |
else:
|
| 449 |
-
return "Falsche Antwort!!!!!!!!!", gr.
|
|
|
|
|
|
|
| 450 |
|
| 451 |
|
| 452 |
"""
|
|
@@ -508,7 +510,7 @@ with gr.Blocks(css=customCSS, theme=themeAlex) as demo:
|
|
| 508 |
with gr.Row():
|
| 509 |
user_input_validate =gr.Textbox(label= "Bitte das oben im Moodle Kurs angegebene Wort eingeben, um die Anwendung zu starten", visible=True, interactive=True, scale= 7)
|
| 510 |
validate_btn = gr.Button("Validieren", visible = True)
|
| 511 |
-
validation_result = gr.Text(label="Validierungsergebnis")
|
| 512 |
|
| 513 |
with gr.Tab("KKG KI-Suche") as tab1:
|
| 514 |
with gr.Row():
|
|
|
|
| 444 |
def validate_input(user_input_validate, validate=False):
|
| 445 |
user_input_hashed = hash_input(user_input_validate)
|
| 446 |
if user_input_hashed == hash_input(ANTI_BOT_PW):
|
| 447 |
+
return "Richtig! Weiter gehts... ", True, gr.Textbox(visible=False), gr.Button(visible=False)
|
| 448 |
else:
|
| 449 |
+
return "Falsche Antwort!!!!!!!!!", False, gr.Textbox(label = "", placeholder="Bitte tippen Sie das oben im Moodle Kurs angegebene Wort ein, um zu beweisen, dass Sie kein Bot sind.", visible=True, scale= 5), gr.Button("Validieren", visible = True)
|
| 450 |
+
|
| 451 |
+
|
| 452 |
|
| 453 |
|
| 454 |
"""
|
|
|
|
| 510 |
with gr.Row():
|
| 511 |
user_input_validate =gr.Textbox(label= "Bitte das oben im Moodle Kurs angegebene Wort eingeben, um die Anwendung zu starten", visible=True, interactive=True, scale= 7)
|
| 512 |
validate_btn = gr.Button("Validieren", visible = True)
|
| 513 |
+
#validation_result = gr.Text(label="Validierungsergebnis")
|
| 514 |
|
| 515 |
with gr.Tab("KKG KI-Suche") as tab1:
|
| 516 |
with gr.Row():
|