Riccardo Giorato commited on
Commit
06568b4
1 Parent(s): b3a94b8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -9
app.py CHANGED
@@ -189,11 +189,7 @@ with gr.Blocks(css=css) as demo:
189
 
190
  with gr.Column(scale=55):
191
  with gr.Group():
192
- model_name = gr.Dropdown(label="Model", choices=[m.name for m in models], value=current_model.name)
193
- with gr.Box(visible=False) as custom_model_group:
194
- custom_model_path = gr.Textbox(label="Custom model path", placeholder="Path to model, e.g. riccardogiorato/beeple", interactive=True)
195
- gr.HTML("<div><font size='2'>Custom models have to be downloaded first, so give it some time.</font></div>")
196
-
197
  with gr.Row():
198
  prompt = gr.Textbox(label="Prompt", show_label=False, max_lines=2,placeholder="Enter prompt. Style applied automatically").style(container=False)
199
  generate = gr.Button(value="Generate").style(rounded=(False, True, True, False))
@@ -226,10 +222,6 @@ with gr.Blocks(css=css) as demo:
226
  image = gr.Image(label="Image", height=256, tool="editor", type="pil")
227
  strength = gr.Slider(label="Transformation strength", minimum=0, maximum=1, step=0.01, value=0.5)
228
 
229
- model_name.change(lambda x: gr.update(visible = x == models[0].name), inputs=model_name, outputs=custom_model_group)
230
- custom_model_path.change(custom_model_changed, inputs=custom_model_path, outputs=None)
231
- # n_images.change(lambda n: gr.Gallery().style(grid=[2 if n > 1 else 1], height="auto"), inputs=n_images, outputs=gallery)
232
-
233
  inputs = [model_name, prompt, guidance, steps, width, height, seed, image, strength, neg_prompt]
234
  prompt.submit(inference, inputs=inputs, outputs=image_out)
235
  generate.click(inference, inputs=inputs, outputs=image_out)
 
189
 
190
  with gr.Column(scale=55):
191
  with gr.Group():
192
+ model_name = gr.Dropdown(label="Model", choices=[m.name for m in models], value=current_model.name)
 
 
 
 
193
  with gr.Row():
194
  prompt = gr.Textbox(label="Prompt", show_label=False, max_lines=2,placeholder="Enter prompt. Style applied automatically").style(container=False)
195
  generate = gr.Button(value="Generate").style(rounded=(False, True, True, False))
 
222
  image = gr.Image(label="Image", height=256, tool="editor", type="pil")
223
  strength = gr.Slider(label="Transformation strength", minimum=0, maximum=1, step=0.01, value=0.5)
224
 
 
 
 
 
225
  inputs = [model_name, prompt, guidance, steps, width, height, seed, image, strength, neg_prompt]
226
  prompt.submit(inference, inputs=inputs, outputs=image_out)
227
  generate.click(inference, inputs=inputs, outputs=image_out)