francescoKrnl commited on
Commit
94b2733
1 Parent(s): 11c4ca1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -166,7 +166,7 @@ head="""<meta name="theme-color" content="#000"><link href="https://fonts.cdnfon
166
 
167
  with gr.Blocks(css="style.css") as demo:
168
  gr.HTML("""<div id="header_block">
169
- <h1>Scopri la magia del nuovo<br />design Made in Italy</h1>
170
  <div id="logos_block">
171
  <img id="logos_row" src="file=assets/logos.png" alt="logo" />
172
  <div id="text_row">
@@ -179,7 +179,7 @@ with gr.Blocks(css="style.css") as demo:
179
  with gr.Row(elem_id="board_row"):
180
  with gr.Group(elem_id="input_image_container", elem_classes="image_container" ):
181
  image = gr.Sketchpad(type="pil", image_mode="L",container=False, height="100%", width="100%", value = empty_input_image,
182
- brush = gr.Brush(default_size="4", colors=["#000000"], color_mode="fixed"), layers = False,
183
  # invert_colors=True, shape=(512, 512), brush_radius=4,
184
  interactive=True, show_download_button=True, elem_id="input_image", show_label=False)
185
  gr.HTML("""<img src="file=assets/drawCta.png" id="draw_cta" alt="draw here image" />""",elem_id="draw_cta_container")
@@ -196,6 +196,6 @@ with gr.Blocks(css="style.css") as demo:
196
  outputs = [result]
197
  item.change(fn=run, inputs=inputs, outputs=outputs)
198
  image.change(fn=run, inputs=inputs, outputs=outputs, trigger_mode="always_last")
199
-
200
  if __name__ == "__main__":
201
  demo.queue().launch(debug=True, allowed_paths=["."])
 
166
 
167
  with gr.Blocks(css="style.css") as demo:
168
  gr.HTML("""<div id="header_block">
169
+ <h1>Dai forma al nuovo<br />design Made in Italy</h1>
170
  <div id="logos_block">
171
  <img id="logos_row" src="file=assets/logos.png" alt="logo" />
172
  <div id="text_row">
 
179
  with gr.Row(elem_id="board_row"):
180
  with gr.Group(elem_id="input_image_container", elem_classes="image_container" ):
181
  image = gr.Sketchpad(type="pil", image_mode="L",container=False, height="100%", width="100%", value = empty_input_image,
182
+ brush = gr.Brush(default_size="2", colors=["#000000"], color_mode="fixed"), layers = False,
183
  # invert_colors=True, shape=(512, 512), brush_radius=4,
184
  interactive=True, show_download_button=True, elem_id="input_image", show_label=False)
185
  gr.HTML("""<img src="file=assets/drawCta.png" id="draw_cta" alt="draw here image" />""",elem_id="draw_cta_container")
 
196
  outputs = [result]
197
  item.change(fn=run, inputs=inputs, outputs=outputs)
198
  image.change(fn=run, inputs=inputs, outputs=outputs, trigger_mode="always_last")
199
+ image.change(fn=empty_input_image, outputs=image)
200
  if __name__ == "__main__":
201
  demo.queue().launch(debug=True, allowed_paths=["."])