Spaces:
Runtime error
Runtime error
add default
Browse files
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 |
-
'
|
116 |
-
'
|
117 |
-
'
|
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 |
|