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...
|
| 448 |
else:
|
| 449 |
-
return "Falsche Antwort!!!!!!!!!",
|
|
|
|
|
|
|
| 450 |
"""
|
| 451 |
def custom_css():
|
| 452 |
return
|
|
@@ -472,7 +474,7 @@ additional_inputs = [
|
|
| 472 |
gr.Slider(label="Top-p (nucleus sampling)", value=0.6, minimum=0.0, maximum=1, step=0.05, interactive=True, info="Höhere Werte verwenden auch Tokens mit niedrigerer Wahrscheinlichkeit.", visible=True),
|
| 473 |
gr.Slider(label="Repetition penalty", value=1.2, minimum=1.0, maximum=2.0, step=0.05, interactive=True, info="Strafe für wiederholte Tokens", visible=True)
|
| 474 |
]
|
| 475 |
-
with gr.Blocks( theme=themeAlex) as demo:
|
| 476 |
#validiert speichern
|
| 477 |
validate = gr.State(True)
|
| 478 |
#Session Variablen, um Weete zu speichern, auch wenn die Felder in der GUI bereits wieder leer sind
|
|
|
|
| 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.update(visible=False), gr.update(visible=False)
|
| 448 |
else:
|
| 449 |
+
return "Falsche Antwort!!!!!!!!!", gr.update(visible=True), gr.update(visible=True)
|
| 450 |
+
|
| 451 |
+
|
| 452 |
"""
|
| 453 |
def custom_css():
|
| 454 |
return
|
|
|
|
| 474 |
gr.Slider(label="Top-p (nucleus sampling)", value=0.6, minimum=0.0, maximum=1, step=0.05, interactive=True, info="Höhere Werte verwenden auch Tokens mit niedrigerer Wahrscheinlichkeit.", visible=True),
|
| 475 |
gr.Slider(label="Repetition penalty", value=1.2, minimum=1.0, maximum=2.0, step=0.05, interactive=True, info="Strafe für wiederholte Tokens", visible=True)
|
| 476 |
]
|
| 477 |
+
with gr.Blocks(css=customCSS, theme=themeAlex) as demo:
|
| 478 |
#validiert speichern
|
| 479 |
validate = gr.State(True)
|
| 480 |
#Session Variablen, um Weete zu speichern, auch wenn die Felder in der GUI bereits wieder leer sind
|