Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,15 +1,18 @@
|
|
1 |
import gradio as gr
|
|
|
2 |
|
3 |
-
def
|
4 |
-
|
|
|
|
|
|
|
|
|
5 |
|
6 |
inputs = [
|
7 |
-
gr.inputs.Textbox(label="
|
8 |
-
gr.inputs.Textbox(label="
|
9 |
-
gr.inputs.Textbox(label="City",type="text"),
|
10 |
-
gr.inputs.Textbox(label="Key",type="password")
|
11 |
]
|
12 |
|
13 |
-
iface = gr.Interface(fn=
|
14 |
|
15 |
iface.launch()
|
|
|
1 |
import gradio as gr
|
2 |
+
import os
|
3 |
|
4 |
+
def function(Textbox,Textbox2):
|
5 |
+
target = os.environ.get("target")
|
6 |
+
if Textbox2 == target:
|
7 |
+
return "Yes"
|
8 |
+
else:
|
9 |
+
return "No"
|
10 |
|
11 |
inputs = [
|
12 |
+
gr.inputs.Textbox(label="Textbox",type="text"),
|
13 |
+
gr.inputs.Textbox(label="Textbox2",type="password")
|
|
|
|
|
14 |
]
|
15 |
|
16 |
+
iface = gr.Interface(fn=function, inputs=inputs, outputs="text")
|
17 |
|
18 |
iface.launch()
|