DemahAlmutairi commited on
Commit
042c428
·
verified ·
1 Parent(s): 3e9c26a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -1
app.py CHANGED
@@ -53,6 +53,12 @@ with gr.Blocks() as iface:
53
  with gr.Tab("Sketch"):
54
  input_sketchpad = gr.Sketchpad(type="pil", label="Sketch", layers=False)
55
  input_tabs.select(fn=tabs_select, inputs=[state])
 
 
 
 
 
 
56
  with gr.Row():
57
  with gr.Column():
58
  clear_btn = gr.ClearButton(
@@ -63,7 +69,7 @@ with gr.Blocks() as iface:
63
  fn=parse_input,
64
  inputs=[input_image, input_sketchpad, state],
65
  outputs= gr.Textbox(label = "Result"))
66
-
67
  # Launch the interface
68
  if __name__ == "__main__":
69
  iface.launch()
 
53
  with gr.Tab("Sketch"):
54
  input_sketchpad = gr.Sketchpad(type="pil", label="Sketch", layers=False)
55
  input_tabs.select(fn=tabs_select, inputs=[state])
56
+
57
+ example_img = "https://sl.bing.net/i3YznO6vkiW"
58
+ example_button = gr.Button("Use example image")
59
+ df use_example_img():
60
+ return example_img
61
+
62
  with gr.Row():
63
  with gr.Column():
64
  clear_btn = gr.ClearButton(
 
69
  fn=parse_input,
70
  inputs=[input_image, input_sketchpad, state],
71
  outputs= gr.Textbox(label = "Result"))
72
+ example_button.click(use_example_img, input_image)
73
  # Launch the interface
74
  if __name__ == "__main__":
75
  iface.launch()