QIU JUNZHE commited on
Commit
8d38ee7
1 Parent(s): 39b2bf5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -75
app.py CHANGED
@@ -394,84 +394,20 @@ css=""""""
394
 
395
 
396
  with gr.Blocks(css=css) as myface:
397
- gr.HTML("""<!DOCTYPE html>
398
- <html lang="en">
399
- <head>
400
- <meta charset="utf-8" />
401
- <meta name="twitter:card" content="player"/>
402
- <meta name="twitter:site" content=""/>
403
- <meta name="twitter:player" content="https://omnibus-maximum-multiplier-places.hf.space"/>
404
- <meta name="twitter:player:stream" content="https://omnibus-maximum-multiplier-places.hf.space"/>
405
- <meta name="twitter:player:width" content="100%"/>
406
- <meta name="twitter:player:height" content="600"/>
407
- <meta property="og:title" content="Embedded Live Viewer"/>
408
- <meta property="og:description" content="Tweet Genie - A Huggingface Space"/>
409
- <meta property="og:image" content="https://cdn.glitch.global/80dbe92e-ce75-44af-84d5-74a2e21e9e55/omnicard.png?v=1676772531627"/>
410
- <!--<meta http-equiv="refresh" content="0; url=https://huggingface.co/spaces/corbt/tweet-genie">-->
411
- </head>
412
- </html>
413
- """)
414
  with gr.Row():
415
  with gr.Tab("Title"):
416
- gr.HTML(""" <title>Minimum Multiplier</title><div style="text-align: center; max-width: 1500px; margin: 0 auto;">
417
- <h1>Fill the Textbox at the top and click Generate Image</h1>
418
- <br><h4>The first time you load a model it takes 200 seconds</h4>
419
- <br><h4>But after it loads each image takes 20 seconds to generate!</h4>
420
-
421
- """)
422
-
423
- with gr.Tab("Description"):
424
- gr.HTML("""<div style="text-align:center;">
425
- <h4>As many Text-to-Image Models as I can fit here</h4><br>
426
- <h4>Suggest more up in the "Community" button</h4>
427
-
428
- </div>""")
429
-
430
- with gr.Tab("Tools"):
431
- with gr.Tab("View"):
432
- with gr.Row():
433
- with gr.Column(style="width=50%, height=70%"):
434
- gr.Pil(label="Crop")
435
- with gr.Column(style="width=50%, height=70%"):
436
- gr.Pil(label="Crop")
437
-
438
-
439
- with gr.Tab("Draw"):
440
- with gr.Column(style="width=50%, height=70%"):
441
- gr.Pil(label="Crop")
442
- with gr.Column(style="width=50%, height=70%"):
443
- gr.Pil(label="Draw")
444
-
445
-
446
- gr.ImagePaint(label="Draw")
447
-
448
- with gr.Tab("Text"):
449
- with gr.Row():
450
-
451
- with gr.Column(scale=50):
452
- gr.Textbox(label="", lines=8, interactive=True)
453
-
454
-
455
- with gr.Column(scale=50):
456
- gr.Textbox(label="", lines=8, interactive=True)
457
-
458
- with gr.Tab("Color Picker"):
459
- with gr.Row():
460
-
461
- with gr.Column(scale=50):
462
- gr.ColorPicker(label="Color", interactive=True)
463
-
464
-
465
- with gr.Column(scale=50):
466
- gr.ImagePaint(label="Draw", interactive=True)
467
  with gr.Row():
468
  with gr.Column(scale=100):
469
  magic1=gr.Textbox(lines=4)
470
- run=gr.Button("Generate Image")
471
  with gr.Row():
472
- with gr.Column(scale=100):
473
- #Model selection dropdown
474
- model_name1 = gr.Dropdown(label="Select Model", choices=[m for m in models], type="index", value=current_model, interactive=True)
475
  with gr.Row():
476
  with gr.Column(style="width=400px"):
477
  output1=gr.Image(label=(f"{current_model}"))
@@ -479,9 +415,9 @@ with gr.Blocks(css=css) as myface:
479
 
480
  with gr.Row():
481
  with gr.Column(scale=50):
482
- input_text=gr.Textbox(label="Prompt Idea",lines=2)
483
- use_short=gr.Button("Use Short Prompt")
484
- see_prompts=gr.Button("Extend Idea")
485
 
486
 
487
  def short_prompt(inputs):
 
394
 
395
 
396
  with gr.Blocks(css=css) as myface:
397
+ gr.HTML()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
398
  with gr.Row():
399
  with gr.Tab("Title"):
400
+ gr.HTML(""" <title>多模型加速生成</title><div style="text-align: center; max-width: 1500px; margin: 0 auto;">
401
+ <h1>输入文字生成图像</h1>
402
+ <br><h4>第一次导入模型可能需要200秒生成</h4>
403
+ <br><h4>之后一般只需20秒左右</h4>""")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
404
  with gr.Row():
405
  with gr.Column(scale=100):
406
  magic1=gr.Textbox(lines=4)
407
+ run=gr.Button("生成图像")
408
  with gr.Row():
409
+ with gr.Column(scale=100):
410
+ model_name1 = gr.Dropdown(label="选择模型", choices=[m for m in models], type="index", value=current_model, interactive=True)
 
411
  with gr.Row():
412
  with gr.Column(style="width=400px"):
413
  output1=gr.Image(label=(f"{current_model}"))
 
415
 
416
  with gr.Row():
417
  with gr.Column(scale=50):
418
+ input_text=gr.Textbox(label="提示词点子",lines=2)
419
+ use_short=gr.Button("使用精简提示词(使用框中提示词)")
420
+ see_prompts=gr.Button("扩充框内提示词")
421
 
422
 
423
  def short_prompt(inputs):