multimodalart HF staff commited on
Commit
394d17b
·
verified ·
1 Parent(s): 8ac274b

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -0
app.py ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+
3
+ def generate(number):
4
+ return f"{number}.png"
5
+
6
+ with gr.Blocks() as demo:
7
+ slider = gr.Slider(minimum=1, maximum=3, value=1)
8
+ button = gr.Button()
9
+ image = gr.Image()
10
+ examples = gr.Examples(
11
+ examples=[[1], [2], [3]],
12
+ inputs=[slider],
13
+ outputs=image,
14
+ fn=generate
15
+ )
16
+
17
+ demo.launch()