lvkaokao commited on
Commit
e0aecb6
1 Parent(s): bc3aa41

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -137,10 +137,10 @@ with gr.Blocks(css=css) as demo:
137
 
138
  with gr.Tab("Text-to-Image"):
139
 
140
- with gr.Row() as text_to_image:
141
 
142
- with gr.Column():
143
- prompt = gr.inputs.Textbox(label='Prompt', default='a photo of an astronaut riding a horse on mars')
144
  inference_steps = gr.inputs.Slider(1, 100, label='Inference Steps - increase the steps for better quality (e.g., avoiding black image) ', default=20, step=1)
145
  seed = gr.inputs.Slider(0, 2147483647, label='Seed', default=random_seed, step=1)
146
  guidance_scale = gr.inputs.Slider(1.0, 20.0, label='Guidance Scale - how much the prompt will influence the results', default=7.5, step=0.1)
@@ -162,8 +162,8 @@ with gr.Blocks(css=css) as demo:
162
 
163
  with gr.Tab("Image-to-Image text-guided generation"):
164
 
165
- with gr.Row() as image_to_image:
166
- with gr.Column():
167
  source_img = gr.Image(source="upload", type="pil", value="https://raw.githubusercontent.com/CompVis/stable-diffusion/main/assets/stable-samples/img2img/sketch-mountains-input.jpg")
168
  prompt_2 = gr.inputs.Textbox(label='Prompt', default='A fantasy landscape, trending on artstation')
169
  inference_steps_2 = gr.inputs.Slider(1, 100, label='Inference Steps - increase the steps for better quality (e.g., avoiding black image) ', default=20, step=1)
 
137
 
138
  with gr.Tab("Text-to-Image"):
139
 
140
+ with gr.Row(visible=True) as text_to_image:
141
 
142
+ with gr.Column(visible=True):
143
+ prompt = gr.inputs.Textbox(label='Prompt', default='a photo of an astronaut riding a horse on mars', visible=True)
144
  inference_steps = gr.inputs.Slider(1, 100, label='Inference Steps - increase the steps for better quality (e.g., avoiding black image) ', default=20, step=1)
145
  seed = gr.inputs.Slider(0, 2147483647, label='Seed', default=random_seed, step=1)
146
  guidance_scale = gr.inputs.Slider(1.0, 20.0, label='Guidance Scale - how much the prompt will influence the results', default=7.5, step=0.1)
 
162
 
163
  with gr.Tab("Image-to-Image text-guided generation"):
164
 
165
+ with gr.Row(visible=True) as image_to_image:
166
+ with gr.Column(visible=True):
167
  source_img = gr.Image(source="upload", type="pil", value="https://raw.githubusercontent.com/CompVis/stable-diffusion/main/assets/stable-samples/img2img/sketch-mountains-input.jpg")
168
  prompt_2 = gr.inputs.Textbox(label='Prompt', default='A fantasy landscape, trending on artstation')
169
  inference_steps_2 = gr.inputs.Slider(1, 100, label='Inference Steps - increase the steps for better quality (e.g., avoiding black image) ', default=20, step=1)