Yntec commited on
Commit
19b6cbc
1 Parent(s): 5875d56

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +94 -52
app.py CHANGED
@@ -32,58 +32,100 @@ def send_it1(inputs, model_choice):
32
  return(output1)
33
  css=""""""
34
 
35
- with gr.Blocks(css='style.css') as demo:
36
- gr.HTML(
37
- """
38
- <div style="text-align: center; max-width: 1200px; margin: 0 auto;">
39
- <div>
40
- <style>
41
- h1 {
42
- font-size: 6em;
43
- color: #ffffff;
44
- margin-top: 30px;
45
- margin-bottom: 30px;
46
- text-shadow: 3px 3px 0 rgba(0, 0, 0, 1) !important;
47
- }
48
- </style>
49
- <body>
50
- <div class="center"><h1>ToyWorld XL</h1>
51
- </div>
52
- </body>
53
- </div>
54
- <p style="margin-bottom: 10px; color: #ffffff;">
55
- Top XL models and 401 SD1.5 models for your enjoyment!
56
- <h1>Fill the Textbox at the top and click Generate Image</h1>
57
- <br><h4>The first time you load a model it takes 200 seconds</h4>
58
- <br><h4>But after it loads each image takes 20 seconds to generate!</h4>
59
- </p>
60
- <p style="margin-bottom: 10px; color: #ffaa66; font-size: 98%">
61
- ❤️ Press the Like Button if you enjoy my space! ❤️</a>
62
- </p>
63
- </div>
64
- """
65
- )
66
- with gr.Row():
67
- with gr.Column(scale=100):
68
- magic1=gr.Textbox(lines=4)
69
- gr.HTML("""<style> .gr-button {
70
- color: white !important;
71
- border-color: #000000 !important;
72
- background: #006699 !important;
73
- }</style>""")
74
- run=gr.Button("Generate Image")
75
- with gr.Row():
76
- with gr.Column(scale=100):
77
- #Model selection dropdown
78
- model_name1 = gr.Dropdown(label="Select Model", choices=[m for m in models], type="index", value=current_model, interactive=True)
79
- with gr.Row():
80
- with gr.Column(style="width=800px"):
81
- output1=gr.Image(label=(f"{current_model}"))
82
- with gr.Row():
83
- with gr.Column(scale=50):
84
- input_text=gr.Textbox(label="Use this box to extend an idea automagically, by typing some words and clicking Extend Idea",lines=2)
85
- use_short=gr.Button("Use Short Prompt")
86
- see_prompts=gr.Button("Extend Idea")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
87
  def short_prompt(inputs):
88
  return(inputs)
89
 
 
32
  return(output1)
33
  css=""""""
34
 
35
+ with gr.Blocks(css=css) as myface:
36
+ gr.HTML("""<!DOCTYPE html>
37
+ <html lang="en">
38
+ <head>
39
+ <meta charset="utf-8" />
40
+ <meta name="twitter:card" content="player"/>
41
+ <meta name="twitter:site" content=""/>
42
+ <meta name="twitter:player" content="https://omnibus-maximum-multiplier-places.hf.space"/>
43
+ <meta name="twitter:player:stream" content="https://omnibus-maximum-multiplier-places.hf.space"/>
44
+ <meta name="twitter:player:width" content="100%"/>
45
+ <meta name="twitter:player:height" content="600"/>
46
+ <meta property="og:title" content="Embedded Live Viewer"/>
47
+ <meta property="og:description" content="Tweet Genie - A Huggingface Space"/>
48
+ <meta property="og:image" content="https://cdn.glitch.global/80dbe92e-ce75-44af-84d5-74a2e21e9e55/omnicard.png?v=1676772531627"/>
49
+ <!--<meta http-equiv="refresh" content="0; url=https://huggingface.co/spaces/corbt/tweet-genie">-->
50
+ </head>
51
+ </html>
52
+ """)
53
+ with gr.Row():
54
+ with gr.Tab("Title"):
55
+ gr.HTML(""" <title>Minimum Multiplier</title><div style="text-align: center; max-width: 1500px; margin: 0 auto;">
56
+ <h1>Fill the Textbox at the top and click Generate Image</h1>
57
+ <br><h4>The first time you load a model it takes 200 seconds</h4>
58
+ <br><h4>But after it loads each image takes 20 seconds to generate!</h4>
59
+
60
+ """)
61
+
62
+ with gr.Tab("Description"):
63
+ gr.HTML("""<div style="text-align:center;">
64
+ <h4>As many Text-to-Image Models as I can fit here</h4><br>
65
+ <h4>Suggest more up in the "Community" button</h4>
66
+
67
+ </div>""")
68
+
69
+ with gr.Tab("Tools"):
70
+ with gr.Tab("View"):
71
+ with gr.Row():
72
+ with gr.Column(style="width=50%, height=70%"):
73
+ gr.Pil(label="Crop")
74
+ with gr.Column(style="width=50%, height=70%"):
75
+ gr.Pil(label="Crop")
76
+
77
+
78
+ with gr.Tab("Draw"):
79
+ with gr.Column(style="width=50%, height=70%"):
80
+ gr.Pil(label="Crop")
81
+ with gr.Column(style="width=50%, height=70%"):
82
+ gr.Pil(label="Draw")
83
+
84
+
85
+ gr.ImagePaint(label="Draw")
86
+
87
+ with gr.Tab("Text"):
88
+ with gr.Row():
89
+
90
+ with gr.Column(scale=50):
91
+ gr.Textbox(label="", lines=8, interactive=True)
92
+
93
+
94
+ with gr.Column(scale=50):
95
+ gr.Textbox(label="", lines=8, interactive=True)
96
+
97
+ with gr.Tab("Color Picker"):
98
+ with gr.Row():
99
+
100
+ with gr.Column(scale=50):
101
+ gr.ColorPicker(label="Color", interactive=True)
102
+
103
+
104
+ with gr.Column(scale=50):
105
+ gr.ImagePaint(label="Draw", interactive=True)
106
+ with gr.Row():
107
+ with gr.Column(scale=100):
108
+ magic1=gr.Textbox(lines=4)
109
+ gr.HTML("""<style> .gr-button {
110
+ color: white !important;
111
+ border-color: #000000 !important;
112
+ background: #006699 !important;
113
+ }</style>""")
114
+ run=gr.Button("Generate Image")
115
+ with gr.Row():
116
+ with gr.Column(scale=100):
117
+ #Model selection dropdown
118
+ model_name1 = gr.Dropdown(label="Select Model", choices=[m for m in models], type="index", value=current_model, interactive=True)
119
+ with gr.Row():
120
+ with gr.Column(style="width=800px"):
121
+ output1=gr.Image(label=(f"{current_model}"))
122
+
123
+
124
+ with gr.Row():
125
+ with gr.Column(scale=50):
126
+ input_text=gr.Textbox(label="Use this box to extend an idea automagically, by typing some words and clicking Extend Idea",lines=2)
127
+ use_short=gr.Button("Use Short Prompt")
128
+ see_prompts=gr.Button("Extend Idea")
129
  def short_prompt(inputs):
130
  return(inputs)
131