meng cao commited on
Commit
f056900
·
1 Parent(s): bf8e02d

modify application file

Browse files
Files changed (1) hide show
  1. app.py +11 -2
app.py CHANGED
@@ -3,5 +3,14 @@ import gradio as gr
3
  def greet(name):
4
  return "Hello " + name + "!!"
5
 
6
- iface = gr.Interface(fn=greet, inputs="text", outputs="text")
7
- iface.launch()
 
 
 
 
 
 
 
 
 
 
3
  def greet(name):
4
  return "Hello " + name + "!!"
5
 
6
+ def image_classifier(inp):
7
+ return {'cat': 0.3, 'dog': 0.7}
8
+
9
+ def capitalize_text(input_text):
10
+ return input_text.upper()
11
+
12
+ #iface = gr.Interface(fn=greet, inputs="text", outputs="text")
13
+ iface = gr.Interface(fn=image_classifier, inputs="image", outputs="label")
14
+ #iface = gr.Interface(fn=capitalize_text, inputs="text", outputs="text")
15
+
16
+ iface.launch(share=True)