Spaces:
Runtime error
Runtime error
Commit
·
80d3ffa
1
Parent(s):
8d13dd9
Update app.py
Browse files
app.py
CHANGED
|
@@ -141,7 +141,7 @@ with image_blocks as demo:
|
|
| 141 |
)
|
| 142 |
with gr.Row():
|
| 143 |
with gr.Column():
|
| 144 |
-
image = gr.Image(source='upload', tool='sketch', elem_id="image_upload", type="pil").style(height=400)
|
| 145 |
with gr.Box(elem_id="mask_radio").style(border=False):
|
| 146 |
radio = gr.Radio(["draw a mask above", "type what to mask below"], value="draw a mask above", show_label=False, interactive=True).style(container=False)
|
| 147 |
word_mask = gr.Textbox(label = "What to find in your image", interactive=False, elem_id="word_mask", placeholder="Disabled").style(container=False)
|
|
@@ -155,7 +155,7 @@ with image_blocks as demo:
|
|
| 155 |
}""")
|
| 156 |
btn = gr.Button("Run")
|
| 157 |
with gr.Column():
|
| 158 |
-
result = gr.Image()
|
| 159 |
btn.click(fn=predict, inputs=[radio, image, word_mask, prompt], outputs=result)
|
| 160 |
gr.HTML(
|
| 161 |
"""
|
|
|
|
| 141 |
)
|
| 142 |
with gr.Row():
|
| 143 |
with gr.Column():
|
| 144 |
+
image = gr.Image(source='upload', tool='sketch', elem_id="image_upload", type="pil", label="Upload").style(height=400)
|
| 145 |
with gr.Box(elem_id="mask_radio").style(border=False):
|
| 146 |
radio = gr.Radio(["draw a mask above", "type what to mask below"], value="draw a mask above", show_label=False, interactive=True).style(container=False)
|
| 147 |
word_mask = gr.Textbox(label = "What to find in your image", interactive=False, elem_id="word_mask", placeholder="Disabled").style(container=False)
|
|
|
|
| 155 |
}""")
|
| 156 |
btn = gr.Button("Run")
|
| 157 |
with gr.Column():
|
| 158 |
+
result = gr.Image(label="Result")
|
| 159 |
btn.click(fn=predict, inputs=[radio, image, word_mask, prompt], outputs=result)
|
| 160 |
gr.HTML(
|
| 161 |
"""
|