Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
import os
|
|
|
2 |
import gradio as gr
|
3 |
import numpy as np
|
4 |
import random
|
@@ -140,10 +141,10 @@ with gr.Blocks(css=css) as demo:
|
|
140 |
with gr.Row(visible=True) as text_to_image:
|
141 |
|
142 |
with gr.Column(visible=True):
|
143 |
-
prompt = gr.Textbox(label='Prompt', default='a photo of an astronaut riding a horse on mars')
|
144 |
-
inference_steps = gr.Slider(1, 100, label='Inference Steps - increase the steps for better quality (e.g., avoiding black image) ', default=20, step=1)
|
145 |
-
seed = gr.Slider(0, 2147483647, label='Seed', default=random_seed, step=1)
|
146 |
-
guidance_scale = gr.Slider(1.0, 20.0, label='Guidance Scale - how much the prompt will influence the results', default=7.5, step=0.1)
|
147 |
txt2img_button = gr.Button("Generate Image", variant="primary")
|
148 |
url_SPR_txt = gr.Textbox(label='url_SPR_txt', value=SPR, visible=False)
|
149 |
|
|
|
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
|
|
|
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)
|
147 |
+
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)
|
148 |
txt2img_button = gr.Button("Generate Image", variant="primary")
|
149 |
url_SPR_txt = gr.Textbox(label='url_SPR_txt', value=SPR, visible=False)
|
150 |
|