Fabrice-TIERCELIN commited on
Commit
685881f
1 Parent(s): edcfd06

This PR improves the field labels

Browse files

Uses uppercase and replaces underscores by spaces

Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -1,7 +1,7 @@
1
  import spaces
2
  import gradio as gr
3
  import torch
4
- from diffusers import ControlNetModel, StableDiffusionXLControlNetImg2ImgPipeline, ControlNetModel, AutoencoderKL
5
  from PIL import Image
6
  import os
7
  import time
@@ -95,14 +95,14 @@ class Img2Img:
95
  with gr.Blocks(css=css) as demo:
96
  with gr.Row():
97
  with gr.Column():
98
- self.input_image_path = gr.Image(label="input_image", type='filepath')
99
- self.prompt = gr.Textbox(label="prompt", lines=3)
100
- self.negative_prompt = gr.Textbox(label="negative_prompt", lines=3, value="sketch, lowres, error, extra digit, fewer digits, cropped, worst quality,low quality, normal quality, jpeg artifacts, blurry")
101
- prompt_analysis_button = gr.Button("prompt_analysis")
102
- self.controlnet_scale = gr.Slider(minimum=0.5, maximum=1.25, value=1.0, step=0.01, label="Lineart_fidelity")
103
- generate_button = gr.Button("generate")
104
  with gr.Column():
105
- self.output_image = gr.Image(type="pil", label="output_image")
106
 
107
  prompt_analysis_button.click(
108
  self.process_prompt_analysis,
 
1
  import spaces
2
  import gradio as gr
3
  import torch
4
+ from diffusers import ControlNetModel, StableDiffusionXLControlNetImg2ImgPipeline, AutoencoderKL
5
  from PIL import Image
6
  import os
7
  import time
 
95
  with gr.Blocks(css=css) as demo:
96
  with gr.Row():
97
  with gr.Column():
98
+ self.input_image_path = gr.Image(label="Input image", type='filepath')
99
+ self.prompt = gr.Textbox(label="Prompt", lines=3)
100
+ self.negative_prompt = gr.Textbox(label="Negative prompt", lines=3, value="sketch, lowres, error, extra digit, fewer digits, cropped, worst quality,low quality, normal quality, jpeg artifacts, blurry")
101
+ prompt_analysis_button = gr.Button("Prompt analysis")
102
+ self.controlnet_scale = gr.Slider(minimum=0.5, maximum=1.25, value=1.0, step=0.01, label="Lineart fidelity")
103
+ generate_button = gr.Button(value="Generate", variant="primary")
104
  with gr.Column():
105
+ self.output_image = gr.Image(type="pil", label="Output image")
106
 
107
  prompt_analysis_button.click(
108
  self.process_prompt_analysis,