Spaces:
Runtime error
Runtime error
add mask
Browse files
app.py
CHANGED
@@ -104,16 +104,15 @@ def gr_caption(x):
|
|
104 |
caption_from_model = caption(20, latent, model, tokenizer, )
|
105 |
|
106 |
masked, masked_recon, recon = map(unnorm_pix, (masked, masked_recon, recon))
|
|
|
107 |
|
108 |
-
return
|
109 |
|
110 |
import gradio as gr
|
111 |
|
112 |
demo = gr.Interface(gr_caption,
|
113 |
inputs=[gr.Image(shape=(224, 224))],
|
114 |
-
outputs=[gr.Image(shape=(224, 224)),
|
115 |
-
gr.Image(shape=(224, 224)),
|
116 |
-
gr.Image(shape=(224, 224)),
|
117 |
'text'])
|
118 |
demo.launch()
|
119 |
|
|
|
104 |
caption_from_model = caption(20, latent, model, tokenizer, )
|
105 |
|
106 |
masked, masked_recon, recon = map(unnorm_pix, (masked, masked_recon, recon))
|
107 |
+
return_img = np.concatenate([masked, masked_recon, recon], axis=1)
|
108 |
|
109 |
+
return return_img, caption_from_model
|
110 |
|
111 |
import gradio as gr
|
112 |
|
113 |
demo = gr.Interface(gr_caption,
|
114 |
inputs=[gr.Image(shape=(224, 224))],
|
115 |
+
outputs=[gr.Image(shape=(224, 224 * 3)),
|
|
|
|
|
116 |
'text'])
|
117 |
demo.launch()
|
118 |
|