Spaces:
Runtime error
Runtime error
pallavijaini
commited on
Commit
•
4e2ea55
1
Parent(s):
0267685
Update app.py
Browse filesAdded the visible=True for the missing ones.
app.py
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
import os
|
|
|
2 |
import gradio as gr
|
3 |
import numpy as np
|
4 |
import random
|
@@ -137,9 +138,9 @@ 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)
|
@@ -162,8 +163,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)
|
|
|
1 |
import os
|
2 |
+
os.system("pip install gradio==3.28.0")
|
3 |
import gradio as gr
|
4 |
import numpy as np
|
5 |
import random
|
|
|
138 |
|
139 |
with gr.Tab("Text-to-Image"):
|
140 |
|
141 |
+
with gr.Row(visible=True) as text_to_image:
|
142 |
|
143 |
+
with gr.Column(visible=True):
|
144 |
prompt = gr.inputs.Textbox(label='Prompt', default='a photo of an astronaut riding a horse on mars')
|
145 |
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)
|
146 |
seed = gr.inputs.Slider(0, 2147483647, label='Seed', default=random_seed, step=1)
|
|
|
163 |
|
164 |
with gr.Tab("Image-to-Image text-guided generation"):
|
165 |
|
166 |
+
with gr.Row(visible=True) as image_to_image:
|
167 |
+
with gr.Column(visible=True):
|
168 |
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")
|
169 |
prompt_2 = gr.inputs.Textbox(label='Prompt', default='A fantasy landscape, trending on artstation')
|
170 |
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)
|