Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,8 +1,10 @@
|
|
|
|
|
|
1 |
import gradio as gr
|
2 |
|
3 |
|
4 |
def enable_second_task(secret):
|
5 |
-
if secret == "
|
6 |
return [
|
7 |
gr.Textbox.update(visible=False),
|
8 |
gr.Button.update(visible=False),
|
@@ -24,7 +26,7 @@ def greet(name):
|
|
24 |
demo = gr.Blocks()
|
25 |
with demo:
|
26 |
secret_textbox = gr.Textbox(
|
27 |
-
placeholder="secret", label="Secret", show_label=True
|
28 |
)
|
29 |
secret_button = gr.Button("Submit")
|
30 |
|
|
|
1 |
+
import os
|
2 |
+
|
3 |
import gradio as gr
|
4 |
|
5 |
|
6 |
def enable_second_task(secret):
|
7 |
+
if secret == os.environ["SECRET_KEY"]:
|
8 |
return [
|
9 |
gr.Textbox.update(visible=False),
|
10 |
gr.Button.update(visible=False),
|
|
|
26 |
demo = gr.Blocks()
|
27 |
with demo:
|
28 |
secret_textbox = gr.Textbox(
|
29 |
+
placeholder="Enter secret key", label="Secret", show_label=True
|
30 |
)
|
31 |
secret_button = gr.Button("Submit")
|
32 |
|