Vignesh455 commited on
Commit
016f9e3
·
verified ·
1 Parent(s): a2493a8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -20
app.py CHANGED
@@ -80,18 +80,18 @@ with image_blocks as demo:
80
  with gr.Row():
81
  with gr.Column():
82
  image = gr.Image(source='upload', tool='sketch', elem_id="image_upload", type="pil", label="Upload",height=400)
83
- with gr.Row(elem_id="prompt-container", mobile_collapse=False, equal_height=True):
84
  with gr.Row():
85
  prompt = gr.Textbox(placeholder="Your prompt (what you want in place of what is erased)", show_label=False, elem_id="prompt")
86
  btn = gr.Button("Inpaint!", elem_id="run_button")
87
 
88
  with gr.Accordion(label="Advanced Settings", open=False):
89
- with gr.Row(mobile_collapse=False, equal_height=True):
90
  guidance_scale = gr.Number(value=7.5, minimum=1.0, maximum=20.0, step=0.1, label="guidance_scale")
91
  steps = gr.Number(value=20, minimum=10, maximum=30, step=1, label="steps")
92
  strength = gr.Number(value=0.99, minimum=0.01, maximum=1.0, step=0.01, label="strength")
93
  negative_prompt = gr.Textbox(label="negative_prompt", placeholder="Your negative prompt", info="what you don't want to see in the image")
94
- with gr.Row(mobile_collapse=False, equal_height=True):
95
  schedulers = ["DEISMultistepScheduler", "HeunDiscreteScheduler", "EulerDiscreteScheduler", "DPMSolverMultistepScheduler", "DPMSolverMultistepScheduler-Karras", "DPMSolverMultistepScheduler-Karras-SDE"]
96
  scheduler = gr.Dropdown(label="Schedulers", choices=schedulers, value="EulerDiscreteScheduler")
97
 
@@ -107,23 +107,6 @@ with image_blocks as demo:
107
  prompt.submit(fn=predict, inputs=[image, prompt, negative_prompt, guidance_scale, steps, strength, scheduler], outputs=[image_out, share_btn_container])
108
  share_button.click(None, [], [], _js=share_js)
109
 
110
- gr.Examples(
111
- examples=[
112
- ["./imgs/aaa (8).png"],
113
- ["./imgs/download (1).jpeg"],
114
- ["./imgs/0_oE0mLhfhtS_3Nfm2.png"],
115
- ["./imgs/02_HubertyBlog-1-1024x1024.jpg"],
116
- ["./imgs/jdn_jacques_de_nuce-1024x1024.jpg"],
117
- ["./imgs/c4ca473acde04280d44128ad8ee09e8a.jpg"],
118
- ["./imgs/canam-electric-motorcycles-scaled.jpg"],
119
- ["./imgs/e8717ce80b394d1b9a610d04a1decd3a.jpeg"],
120
- ["./imgs/Nature___Mountains_Big_Mountain_018453_31.jpg"],
121
- ["./imgs/Multible-sharing-room_ccexpress-2-1024x1024.jpeg"],
122
- ],
123
- fn=predict,
124
- inputs=[image],
125
- cache_examples=False,
126
- )
127
  gr.HTML(
128
  """
129
  <div class="footer">
 
80
  with gr.Row():
81
  with gr.Column():
82
  image = gr.Image(source='upload', tool='sketch', elem_id="image_upload", type="pil", label="Upload",height=400)
83
+ with gr.Row(elem_id="prompt-container",equal_height=True):
84
  with gr.Row():
85
  prompt = gr.Textbox(placeholder="Your prompt (what you want in place of what is erased)", show_label=False, elem_id="prompt")
86
  btn = gr.Button("Inpaint!", elem_id="run_button")
87
 
88
  with gr.Accordion(label="Advanced Settings", open=False):
89
+ with gr.Row(equal_height=True):
90
  guidance_scale = gr.Number(value=7.5, minimum=1.0, maximum=20.0, step=0.1, label="guidance_scale")
91
  steps = gr.Number(value=20, minimum=10, maximum=30, step=1, label="steps")
92
  strength = gr.Number(value=0.99, minimum=0.01, maximum=1.0, step=0.01, label="strength")
93
  negative_prompt = gr.Textbox(label="negative_prompt", placeholder="Your negative prompt", info="what you don't want to see in the image")
94
+ with gr.Row(equal_height=True):
95
  schedulers = ["DEISMultistepScheduler", "HeunDiscreteScheduler", "EulerDiscreteScheduler", "DPMSolverMultistepScheduler", "DPMSolverMultistepScheduler-Karras", "DPMSolverMultistepScheduler-Karras-SDE"]
96
  scheduler = gr.Dropdown(label="Schedulers", choices=schedulers, value="EulerDiscreteScheduler")
97
 
 
107
  prompt.submit(fn=predict, inputs=[image, prompt, negative_prompt, guidance_scale, steps, strength, scheduler], outputs=[image_out, share_btn_container])
108
  share_button.click(None, [], [], _js=share_js)
109
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
110
  gr.HTML(
111
  """
112
  <div class="footer">