queelius commited on
Commit
9c7fc23
·
verified ·
1 Parent(s): 0a55553

Upload folder using huggingface_hub

Browse files
Files changed (2) hide show
  1. app.old +7 -0
  2. app.py +9 -4
app.old ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+
3
+ def image_classifier(inp):
4
+ return {'cat': 0.3, 'dog': 0.7}
5
+
6
+ demo = gr.Interface(fn=image_classifier, inputs="image", outputs="label")
7
+ demo.launch()
app.py CHANGED
@@ -1,7 +1,12 @@
1
  import gradio as gr
2
 
3
- def image_classifier(inp):
4
- return {'cat': 0.3, 'dog': 0.7}
5
 
6
- demo = gr.Interface(fn=image_classifier, inputs="image", outputs="label")
7
- demo.launch()
 
 
 
 
 
 
1
  import gradio as gr
2
 
3
+ def greet(name, intensity):
4
+ return "Hello " * intensity + name + "!"
5
 
6
+ demo = gr.Interface(
7
+ fn=greet,
8
+ inputs=["text", "slider"],
9
+ outputs=["text"],
10
+ )
11
+
12
+ demo.launch(share=True) # Share your demo with just 1 extra parameter 🚀