Spaces:
Running
on
Zero
Running
on
Zero
Suchinthana
commited on
Commit
·
2eda22a
1
Parent(s):
2ef199a
Reorder and prompt update
Browse files
app.py
CHANGED
@@ -198,8 +198,8 @@ def generate_satellite_image(init_image, mask_image, prompt):
|
|
198 |
image=init_image,
|
199 |
mask_image=mask_image,
|
200 |
control_image=control_image,
|
201 |
-
strength=0.
|
202 |
-
guidance_scale=
|
203 |
)
|
204 |
return result.images[0]
|
205 |
|
@@ -221,17 +221,16 @@ def handle_query(query):
|
|
221 |
empty_map_image, mask_image, response['output']['feature_representation']['properties']['description']
|
222 |
)
|
223 |
|
224 |
-
return map_image,
|
225 |
|
226 |
def update_query(selected_query):
|
227 |
return selected_query
|
228 |
|
229 |
query_options = [
|
230 |
"Area covering south asian subcontinent",
|
231 |
-
"
|
232 |
-
"Mark a triangular area using New York, Boston, and Philadelphia",
|
233 |
"Mark cities in India",
|
234 |
-
"
|
235 |
"Mark the area of west germany",
|
236 |
"Mark the area of the Amazon rainforest",
|
237 |
"Mark the area of the Sahara desert"
|
@@ -245,12 +244,12 @@ with gr.Blocks() as demo:
|
|
245 |
submit_btn = gr.Button("Submit")
|
246 |
with gr.Row():
|
247 |
map_output = gr.Image(label="Map Visualization")
|
248 |
-
|
249 |
with gr.Row():
|
250 |
-
|
251 |
mask_output = gr.Image(label="Mask")
|
252 |
image_prompt = gr.Textbox(label="Image Prompt Used")
|
253 |
-
submit_btn.click(handle_query, inputs=[query_input], outputs=[map_output,
|
254 |
|
255 |
if __name__ == "__main__":
|
256 |
demo.launch()
|
|
|
198 |
image=init_image,
|
199 |
mask_image=mask_image,
|
200 |
control_image=control_image,
|
201 |
+
strength=0.56,
|
202 |
+
guidance_scale=65
|
203 |
)
|
204 |
return result.images[0]
|
205 |
|
|
|
221 |
empty_map_image, mask_image, response['output']['feature_representation']['properties']['description']
|
222 |
)
|
223 |
|
224 |
+
return map_image, satellite_image, empty_map_image, mask_image, response
|
225 |
|
226 |
def update_query(selected_query):
|
227 |
return selected_query
|
228 |
|
229 |
query_options = [
|
230 |
"Area covering south asian subcontinent",
|
231 |
+
"Mark a triangular area using New York, Boston, and Texas",
|
|
|
232 |
"Mark cities in India",
|
233 |
+
"Show me Lotus Tower in a Map",
|
234 |
"Mark the area of west germany",
|
235 |
"Mark the area of the Amazon rainforest",
|
236 |
"Mark the area of the Sahara desert"
|
|
|
244 |
submit_btn = gr.Button("Submit")
|
245 |
with gr.Row():
|
246 |
map_output = gr.Image(label="Map Visualization")
|
247 |
+
satellite_output = gr.Image(label="Generated Map Image")
|
248 |
with gr.Row():
|
249 |
+
empty_map_output = gr.Image(label="Empty Visualization")
|
250 |
mask_output = gr.Image(label="Mask")
|
251 |
image_prompt = gr.Textbox(label="Image Prompt Used")
|
252 |
+
submit_btn.click(handle_query, inputs=[query_input], outputs=[map_output, satellite_output, empty_map_output, mask_output, image_prompt])
|
253 |
|
254 |
if __name__ == "__main__":
|
255 |
demo.launch()
|