tommy24 commited on
Commit
d51fa15
·
1 Parent(s): e352ebd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -7
app.py CHANGED
@@ -1,15 +1,18 @@
1
  import gradio as gr
 
2
 
3
- def greet(name, age, city,key):
4
- return f"Hello {name}! You are {age} years old, you live in {city} and your key is: {key} ."
 
 
 
 
5
 
6
  inputs = [
7
- gr.inputs.Textbox(label="Name",type="text"),
8
- gr.inputs.Textbox(label="Age", type="text"),
9
- gr.inputs.Textbox(label="City",type="text"),
10
- gr.inputs.Textbox(label="Key",type="password")
11
  ]
12
 
13
- iface = gr.Interface(fn=greet, inputs=inputs, outputs="text", title="Greeting App", description="Enter your name, age, and city to get a greeting!")
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()