Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -38,12 +38,12 @@ def generate_text(prompt):
|
|
| 38 |
|
| 39 |
# Function to check password and show/hide inputs/output
|
| 40 |
def check_password(password_input):
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
|
| 48 |
# Set the callback function for password field
|
| 49 |
demo.set_config(callback=check_password)
|
|
|
|
| 38 |
|
| 39 |
# Function to check password and show/hide inputs/output
|
| 40 |
def check_password(password_input):
|
| 41 |
+
if password_input == password:
|
| 42 |
+
demo.show_input()
|
| 43 |
+
demo.show_output()
|
| 44 |
+
else:
|
| 45 |
+
demo.hide_input()
|
| 46 |
+
demo.hide_output()
|
| 47 |
|
| 48 |
# Set the callback function for password field
|
| 49 |
demo.set_config(callback=check_password)
|