Suchinthana commited on
Commit
2eda22a
·
1 Parent(s): 2ef199a

Reorder and prompt update

Browse files
Files changed (1) hide show
  1. app.py +8 -9
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.42,
202
- guidance_scale=85
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, empty_map_image, satellite_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
- "Draw a line between New York and Los Angeles",
232
- "Mark a triangular area using New York, Boston, and Philadelphia",
233
  "Mark cities in India",
234
- "Mark a circular area around Paris",
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
- empty_map_output = gr.Image(label="Empty Visualization")
249
  with gr.Row():
250
- satellite_output = gr.Image(label="Generated Satellite Image")
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, empty_map_output, satellite_output, mask_output, image_prompt])
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()