Richard Neuschulz commited on
Commit
7487900
1 Parent(s): 919da7e

changed UI some more

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -89,19 +89,18 @@ with gr.Blocks(css=css) as demo:
89
  prompt = gr.Textbox(label="Prompt",
90
  info="Try something like 'a photo of a man/woman/person'",
91
  placeholder="A photo of a [man/woman/person]...")
92
- negative_prompt = gr.Textbox(label="Negative Prompt", placeholder="low quality")
93
  style = "Photorealistic"
94
  submit = gr.Button("Submit")
95
  with gr.Accordion(open=True, label="Advanced Options"):
96
  face_strength = gr.Slider(label="Face Structure strength", info="Only applied if preserve face structure is checked", value=1.3, step=0.1, minimum=0, maximum=3)
97
  likeness_strength = gr.Slider(label="Face Embed strength", value=1.0, step=0.1, minimum=0, maximum=5)
98
- nfaa_negative_prompts = gr.Textbox(label="Appended Negative Prompts", info="Negative prompts to steer generations towards safe for all audiences outputs", value="low quality, worst quality")
99
  with gr.Column():
100
  gallery = gr.Gallery(label="Generated Images")
101
  files.upload(fn=swap_to_gallery, inputs=files, outputs=[uploaded_files, clear_button, files])
102
  remove_and_reupload.click(fn=remove_back_to_files, outputs=[uploaded_files, clear_button, files])
103
  submit.click(fn=generate_image,
104
- inputs=[files,prompt,negative_prompt, face_strength, likeness_strength, nfaa_negative_prompts],
105
  outputs=gallery)
106
 
107
  # gr.Markdown("This demo includes extra features to mitigate the implicit bias of the model and prevent explicit usage of it to generate content with faces of people, including third parties, that is not safe for all audiences, including naked or semi-naked people.")
 
89
  prompt = gr.Textbox(label="Prompt",
90
  info="Try something like 'a photo of a man/woman/person'",
91
  placeholder="A photo of a [man/woman/person]...")
92
+ negative_prompt = gr.Textbox(label="Negative Prompt", placeholder="low quality", value="low quality, worst quality")
93
  style = "Photorealistic"
94
  submit = gr.Button("Submit")
95
  with gr.Accordion(open=True, label="Advanced Options"):
96
  face_strength = gr.Slider(label="Face Structure strength", info="Only applied if preserve face structure is checked", value=1.3, step=0.1, minimum=0, maximum=3)
97
  likeness_strength = gr.Slider(label="Face Embed strength", value=1.0, step=0.1, minimum=0, maximum=5)
 
98
  with gr.Column():
99
  gallery = gr.Gallery(label="Generated Images")
100
  files.upload(fn=swap_to_gallery, inputs=files, outputs=[uploaded_files, clear_button, files])
101
  remove_and_reupload.click(fn=remove_back_to_files, outputs=[uploaded_files, clear_button, files])
102
  submit.click(fn=generate_image,
103
+ inputs=[files,prompt,negative_prompt, face_strength, likeness_strength],
104
  outputs=gallery)
105
 
106
  # gr.Markdown("This demo includes extra features to mitigate the implicit bias of the model and prevent explicit usage of it to generate content with faces of people, including third parties, that is not safe for all audiences, including naked or semi-naked people.")