angtrim commited on
Commit
10a2381
·
verified ·
1 Parent(s): 6e73b66

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -16
app.py CHANGED
@@ -276,7 +276,6 @@ with gr.Blocks(css="style.css") as demo:
276
  <div id="my-div-eraser" class="pad2"> <button id="my-toggle-eraser" onclick="return toggleEraser(this)"></button> </div>
277
  <div class="pad2"> <button id="my-button-undo" onclick="return UNDO_SKETCH_FUNCTION(this)"></button> </div>
278
  <div class="pad2"> <button id="my-button-clear" onclick="return DELETE_SKETCH_FUNCTION(this)"></button> </div>
279
- <div class="pad2"> <button href="TODO" download="image" id="my-button-down" onclick='return theSketchDownloadFunction()'></button> </div>
280
  </div>
281
  """)
282
  # gr.Markdown("## Prompt", elem_id="tools_header")
@@ -284,26 +283,12 @@ with gr.Blocks(css="style.css") as demo:
284
  with gr.Row():
285
  style = gr.Dropdown(label="Style", choices=STYLE_NAMES, value=DEFAULT_STYLE_NAME, scale=1)
286
  prompt_temp = gr.Textbox(label="Prompt Style Template", value=styles[DEFAULT_STYLE_NAME], scale=2, max_lines=1)
287
-
288
- with gr.Row():
289
- val_r = gr.Slider(label="Sketch guidance: ", show_label=True, minimum=0, maximum=1, value=0.4, step=0.01, scale=3)
290
- seed = gr.Textbox(label="Seed", value=42, scale=1, min_width=50)
291
- randomize_seed = gr.Button("Random", scale=1, min_width=50)
292
-
293
- with gr.Column(elem_id="column_process", min_width=50, scale=0.4):
294
- gr.Markdown("## pix2pix-turbo", elem_id="description")
295
- run_button = gr.Button("Run", min_width=50)
296
 
297
  with gr.Column(elem_id="column_output"):
298
  gr.Markdown("## OUTPUT", elem_id="output_header")
299
  result = gr.Image(label="Result", height=440, width=440, elem_id="output_image", show_label=False, show_download_button=True)
300
  download_output = gr.Button("Download output", elem_id="download_output")
301
- gr.Markdown("### Instructions")
302
- gr.Markdown("**1**. Enter a text prompt (e.g. cat)")
303
- gr.Markdown("**2**. Start sketching")
304
- gr.Markdown("**3**. Change the image style using a style template")
305
- gr.Markdown("**4**. Adjust the effect of sketch guidance using the slider")
306
- gr.Markdown("**5**. Try different seeds to generate different results")
307
 
308
 
309
  eraser.change(fn=lambda x: gr.update(value=not x), inputs=[eraser], outputs=[line]).then(update_canvas, [line, eraser], [image])
 
276
  <div id="my-div-eraser" class="pad2"> <button id="my-toggle-eraser" onclick="return toggleEraser(this)"></button> </div>
277
  <div class="pad2"> <button id="my-button-undo" onclick="return UNDO_SKETCH_FUNCTION(this)"></button> </div>
278
  <div class="pad2"> <button id="my-button-clear" onclick="return DELETE_SKETCH_FUNCTION(this)"></button> </div>
 
279
  </div>
280
  """)
281
  # gr.Markdown("## Prompt", elem_id="tools_header")
 
283
  with gr.Row():
284
  style = gr.Dropdown(label="Style", choices=STYLE_NAMES, value=DEFAULT_STYLE_NAME, scale=1)
285
  prompt_temp = gr.Textbox(label="Prompt Style Template", value=styles[DEFAULT_STYLE_NAME], scale=2, max_lines=1)
286
+
 
 
 
 
 
 
 
 
287
 
288
  with gr.Column(elem_id="column_output"):
289
  gr.Markdown("## OUTPUT", elem_id="output_header")
290
  result = gr.Image(label="Result", height=440, width=440, elem_id="output_image", show_label=False, show_download_button=True)
291
  download_output = gr.Button("Download output", elem_id="download_output")
 
 
 
 
 
 
292
 
293
 
294
  eraser.change(fn=lambda x: gr.update(value=not x), inputs=[eraser], outputs=[line]).then(update_canvas, [line, eraser], [image])