tennant commited on
Commit
bde07f0
1 Parent(s): c62dc3f

add default

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -111,12 +111,13 @@ def gr_caption(x, mask_ratio=0.75, max_len=20, prefix='a'):
111
  import gradio as gr
112
 
113
  demo = gr.Interface(gr_caption,
114
- inputs=[gr.Image(shape=(224, 224)),
115
- 'number',
116
- 'number',
117
- 'text'],
118
  outputs=[gr.Image(shape=(224, 224 * 3)),
119
  'text'],
120
- examples=[['cat.jpeg', 0.75, 20, 'a photo of a']],)
 
121
  demo.launch()
122
 
 
111
  import gradio as gr
112
 
113
  demo = gr.Interface(gr_caption,
114
+ inputs=[gr.Image(value='cat.jpeg', shape=(224, 224)),
115
+ gr.Number(value=0.75, label='mask ratio'),
116
+ gr.Number(value=20, label='max length'),
117
+ gr.Textbox(value='a photo of a', label='caption prefix')],
118
  outputs=[gr.Image(shape=(224, 224 * 3)),
119
  'text'],
120
+ # examples=[['cat.jpeg', 0.75, 20, 'a photo of a']],
121
+ )
122
  demo.launch()
123