Spaces:
Runtime error
Runtime error
Suchinthana
commited on
Commit
Β·
681ada7
1
Parent(s):
bde9aab
adding empty visuals
Browse files
app.py
CHANGED
|
@@ -224,7 +224,7 @@ def handle_query(query):
|
|
| 224 |
map_image, mask_image, response['output']['feature_representation']['properties']['description']
|
| 225 |
)
|
| 226 |
|
| 227 |
-
return map_image, satellite_image, mask_image, response
|
| 228 |
|
| 229 |
|
| 230 |
# Gradio interface
|
|
@@ -234,10 +234,12 @@ with gr.Blocks() as demo:
|
|
| 234 |
submit_btn = gr.Button("Submit")
|
| 235 |
with gr.Row():
|
| 236 |
map_output = gr.Image(label="Map Visualization")
|
|
|
|
|
|
|
| 237 |
satellite_output = gr.Image(label="Generated Satellite Image")
|
| 238 |
mask_output = gr.Image(label="Mask")
|
| 239 |
image_prompt = gr.Textbox(label="Image Prompt Used")
|
| 240 |
-
submit_btn.click(handle_query, inputs=[query_input], outputs=[map_output, satellite_output, mask_output, image_prompt])
|
| 241 |
|
| 242 |
if __name__ == "__main__":
|
| 243 |
demo.launch()
|
|
|
|
| 224 |
map_image, mask_image, response['output']['feature_representation']['properties']['description']
|
| 225 |
)
|
| 226 |
|
| 227 |
+
return map_image, empty_map_image, satellite_image, mask_image, response
|
| 228 |
|
| 229 |
|
| 230 |
# Gradio interface
|
|
|
|
| 234 |
submit_btn = gr.Button("Submit")
|
| 235 |
with gr.Row():
|
| 236 |
map_output = gr.Image(label="Map Visualization")
|
| 237 |
+
empty_map_output = gr.Image(label="Empty Visualization")
|
| 238 |
+
with gr.Row():
|
| 239 |
satellite_output = gr.Image(label="Generated Satellite Image")
|
| 240 |
mask_output = gr.Image(label="Mask")
|
| 241 |
image_prompt = gr.Textbox(label="Image Prompt Used")
|
| 242 |
+
submit_btn.click(handle_query, inputs=[query_input], outputs=[map_output, empty_map_output, satellite_output, mask_output, image_prompt])
|
| 243 |
|
| 244 |
if __name__ == "__main__":
|
| 245 |
demo.launch()
|