userIdc2024 commited on
Commit
5ba6fd4
·
verified ·
1 Parent(s): 691ee6a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +23 -26
app.py CHANGED
@@ -128,10 +128,7 @@ with gr.Blocks(css=css) as demo:
128
  init_image_state = gr.State()
129
  with gr.Column(elem_id="container"):
130
  gr.Markdown(
131
- """# SDXL Turbo Image to Image/Text to Image
132
- ## Unofficial Demo
133
- SDXL Turbo model can generate high quality images in a single pass read more on [stability.ai post](https://stability.ai/news/stability-ai-sdxl-turbo).
134
- **Model**: https://huggingface.co/stabilityai/sdxl-turbo
135
  """,
136
  elem_id="intro",
137
  )
@@ -142,26 +139,6 @@ with gr.Blocks(css=css) as demo:
142
  container=False,
143
  )
144
  generate_bt = gr.Button("Generate", scale=1)
145
- with gr.Column():
146
- image = gr.Image(type="filepath")
147
- with gr.Accordion("Advanced options", open=False):
148
- strength = gr.Slider(
149
- label="Strength",
150
- value=0.7,
151
- minimum=0.0,
152
- maximum=1.0,
153
- step=0.001,
154
- )
155
- steps = gr.Slider(
156
- label="Steps", value=2, minimum=1, maximum=10, step=1
157
- )
158
- seed = gr.Slider(
159
- randomize=True,
160
- minimum=0,
161
- maximum=12013012031030,
162
- label="Seed",
163
- step=1,
164
- )
165
  with gr.Row():
166
  with gr.Column():
167
  image_input = gr.Image(
@@ -169,8 +146,28 @@ with gr.Blocks(css=css) as demo:
169
  label="Webcam",
170
  type="pil",
171
  )
172
-
173
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
174
  inputs = [image_input, prompt, strength, steps, seed]
175
  generate_bt.click(fn=predict, inputs=inputs, outputs=image, show_progress=False)
176
  prompt.change(fn=predict, inputs=inputs, outputs=image, show_progress=False)
 
128
  init_image_state = gr.State()
129
  with gr.Column(elem_id="container"):
130
  gr.Markdown(
131
+ """# Real Time Image Generation
 
 
 
132
  """,
133
  elem_id="intro",
134
  )
 
139
  container=False,
140
  )
141
  generate_bt = gr.Button("Generate", scale=1)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
142
  with gr.Row():
143
  with gr.Column():
144
  image_input = gr.Image(
 
146
  label="Webcam",
147
  type="pil",
148
  )
149
+ with gr.Column():
150
+ image = gr.Image(type="filepath")
151
+ with gr.Accordion("Advanced options", open=False):
152
+ strength = gr.Slider(
153
+ label="Strength",
154
+ value=0.7,
155
+ minimum=0.0,
156
+ maximum=1.0,
157
+ step=0.001,
158
+ )
159
+ steps = gr.Slider(
160
+ label="Steps", value=2, minimum=1, maximum=10, step=1
161
+ )
162
+ seed = gr.Slider(
163
+ randomize=True,
164
+ minimum=0,
165
+ maximum=12013012031030,
166
+ label="Seed",
167
+ step=1,
168
+ )
169
+
170
+
171
  inputs = [image_input, prompt, strength, steps, seed]
172
  generate_bt.click(fn=predict, inputs=inputs, outputs=image, show_progress=False)
173
  prompt.change(fn=predict, inputs=inputs, outputs=image, show_progress=False)