myn0908 commited on
Commit
c8c1036
1 Parent(s): 254f498

desgin UI 2

Browse files
Files changed (1) hide show
  1. app.py +43 -61
app.py CHANGED
@@ -219,30 +219,35 @@ with gr.Blocks(css=css, theme="NoCrypt/miku@1.2.1") as demo:
219
  canvas_size=(1024, 1024),
220
  layers=False
221
  )
222
- # input_image = gr.File(label='Input image')
223
- url_image = gr.Textbox(label="Image URLS", value="")
224
- with gr.Row():
225
- ui_mode = gr.Radio(
226
- choices=["Light Mode", "Dark Mode"],
227
- value="Light Mode",
228
- label="Switch Light/Dark Mode UI",
229
- interactive=True)
230
- type_image = gr.Radio(
231
- choices=["RGB", "SKETCH"],
232
- value="SKETCH",
233
- label="Type of Image (Color Image or Sketch Image)",
234
- interactive=True)
235
- input_type = gr.Radio(
236
- choices=["live-sketch", "url-sketch"],
237
- value="live-sketch",
238
- label="Type Sketch2Image models",
239
- interactive=True)
240
- style = gr.Dropdown(
241
- label="Style",
242
- choices=controller.STYLE_NAMES,
243
- value=controller.DEFAULT_STYLE_NAME,
244
- scale=1,
245
- )
 
 
 
 
 
246
 
247
  with gr.Column(elem_id="column_output"):
248
  gr.Markdown("## IMAGE GENERATE", elem_id="output_header")
@@ -262,50 +267,27 @@ with gr.Blocks(css=css, theme="NoCrypt/miku@1.2.1") as demo:
262
  prompt = gr.Textbox(label="Personalized Text", value="", show_label=True)
263
  with gr.Accordion("S2I Advances Option", open=True):
264
  with gr.Row():
265
- # ui_mode = gr.Radio(
266
- # choices=["Light Mode", "Dark Mode"],
267
- # value="Light Mode",
268
- # label="Switch Light/Dark Mode UI",
269
- # interactive=True)
270
- # type_image = gr.Radio(
271
- # choices=["RGB", "SKETCH"],
272
- # value="SKETCH",
273
- # label="Type of Image (Color Image or Sketch Image)",
274
- # interactive=True)
275
- # input_type = gr.Radio(
276
- # choices=["live-sketch", "url-sketch"],
277
- # value="live-sketch",
278
- # label="Type Sketch2Image models",
279
- # interactive=True)
280
- # style = gr.Dropdown(
281
- # label="Style",
282
- # choices=controller.STYLE_NAMES,
283
- # value=controller.DEFAULT_STYLE_NAME,
284
- # scale=1,
285
- # )
286
  prompt_temp = gr.Textbox(
287
  label="Prompt Style Template",
288
  value=controller.styles[controller.DEFAULT_STYLE_NAME],
289
  scale=2,
290
  max_lines=1,
291
  )
 
292
  seed = gr.Textbox(label="Seed", value='42', scale=1, min_width=50)
293
- zero_gpu_options = gr.Radio(
294
- choices=["GPU", "CPU"],
295
- value="GPU",
296
- label="GPU & CPU Options Spaces",
297
- interactive=True)
298
- half_model = gr.Radio(
299
- choices=["float32", "float16"],
300
- value="float16",
301
- label="Demo Speed",
302
- interactive=True)
303
- model_options = gr.Radio(
304
- choices=["350k", "350k-adapter"],
305
- value="350k-adapter",
306
- label="Type Sketch2Image models",
307
- interactive=True)
308
-
309
  val_r = gr.Slider(
310
  label="Sketch guidance: ",
311
  show_label=True,
 
219
  canvas_size=(1024, 1024),
220
  layers=False
221
  )
222
+ with gr.Group():
223
+ with gr.Row():
224
+ url_image = gr.Textbox(label="Image URLS", value="")
225
+ with gr.Row():
226
+ ui_mode = gr.Radio(
227
+ choices=["Light Mode", "Dark Mode"],
228
+ value="Light Mode",
229
+ label="Switch Light/Dark Mode UI",
230
+ interactive=True)
231
+ zero_gpu_options = gr.Radio(
232
+ choices=["GPU", "CPU"],
233
+ value="GPU",
234
+ label="GPU & CPU Options Spaces",
235
+ interactive=True)
236
+ model_options = gr.Radio(
237
+ choices=["350k", "350k-adapter"],
238
+ value="350k-adapter",
239
+ label="Type Sketch2Image models",
240
+ interactive=True)
241
+ half_model = gr.Radio(
242
+ choices=["float32", "float16"],
243
+ value="float16",
244
+ label="Demo Speed",
245
+ interactive=True)
246
+ type_image = gr.Radio(
247
+ choices=["RGB", "SKETCH"],
248
+ value="SKETCH",
249
+ label="Type of Image (Color Image or Sketch Image)",
250
+ interactive=True)
251
 
252
  with gr.Column(elem_id="column_output"):
253
  gr.Markdown("## IMAGE GENERATE", elem_id="output_header")
 
267
  prompt = gr.Textbox(label="Personalized Text", value="", show_label=True)
268
  with gr.Accordion("S2I Advances Option", open=True):
269
  with gr.Row():
270
+ input_type = gr.Radio(
271
+ choices=["live-sketch", "url-sketch"],
272
+ value="live-sketch",
273
+ label="Type Sketch2Image models",
274
+ interactive=True)
275
+
276
+ style = gr.Dropdown(
277
+ label="Style",
278
+ choices=controller.STYLE_NAMES,
279
+ value=controller.DEFAULT_STYLE_NAME,
280
+ scale=1,
281
+ )
 
 
 
 
 
 
 
 
 
282
  prompt_temp = gr.Textbox(
283
  label="Prompt Style Template",
284
  value=controller.styles[controller.DEFAULT_STYLE_NAME],
285
  scale=2,
286
  max_lines=1,
287
  )
288
+
289
  seed = gr.Textbox(label="Seed", value='42', scale=1, min_width=50)
290
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
291
  val_r = gr.Slider(
292
  label="Sketch guidance: ",
293
  show_label=True,