Spaces:
Runtime error
Runtime error
Update backup.app.py
Browse files- backup.app.py +2 -28
backup.app.py
CHANGED
@@ -55,19 +55,8 @@ with gr.Blocks(css=css) as myface:
|
|
55 |
""")
|
56 |
with gr.Row():
|
57 |
with gr.Tab("Title"):
|
58 |
-
gr.HTML("""
|
59 |
-
<h1>
|
60 |
-
<br><h4>The first time you load a model it takes 200 seconds</h4>
|
61 |
-
<br><h4>But after it loads each image takes 20 seconds to generate!</h4>
|
62 |
-
|
63 |
-
""")
|
64 |
-
|
65 |
-
with gr.Tab("Description"):
|
66 |
-
gr.HTML("""<div style="text-align:center;">
|
67 |
-
<h4>As many Text-to-Image Models as I can fit here</h4><br>
|
68 |
-
<h4>Suggest more up in the "Community" button</h4>
|
69 |
-
|
70 |
-
</div>""")
|
71 |
|
72 |
with gr.Tab("Tools"):
|
73 |
with gr.Tab("View"):
|
@@ -77,33 +66,24 @@ with gr.Blocks(css=css) as myface:
|
|
77 |
with gr.Column(style="width=50%, height=70%"):
|
78 |
gr.Pil(label="Crop")
|
79 |
|
80 |
-
|
81 |
with gr.Tab("Draw"):
|
82 |
with gr.Column(style="width=50%, height=70%"):
|
83 |
gr.Pil(label="Crop")
|
84 |
with gr.Column(style="width=50%, height=70%"):
|
85 |
gr.Pil(label="Draw")
|
86 |
-
|
87 |
-
|
88 |
gr.ImagePaint(label="Draw")
|
89 |
|
90 |
with gr.Tab("Text"):
|
91 |
with gr.Row():
|
92 |
-
|
93 |
with gr.Column(scale=50):
|
94 |
gr.Textbox(label="", lines=8, interactive=True)
|
95 |
-
|
96 |
-
|
97 |
with gr.Column(scale=50):
|
98 |
gr.Textbox(label="", lines=8, interactive=True)
|
99 |
|
100 |
with gr.Tab("Color Picker"):
|
101 |
with gr.Row():
|
102 |
-
|
103 |
with gr.Column(scale=50):
|
104 |
gr.ColorPicker(label="Color", interactive=True)
|
105 |
-
|
106 |
-
|
107 |
with gr.Column(scale=50):
|
108 |
gr.ImagePaint(label="Draw", interactive=True)
|
109 |
with gr.Row():
|
@@ -112,29 +92,23 @@ with gr.Blocks(css=css) as myface:
|
|
112 |
run=gr.Button("Generate Image")
|
113 |
with gr.Row():
|
114 |
with gr.Column(scale=100):
|
115 |
-
#Model selection dropdown
|
116 |
model_name1 = gr.Dropdown(label="Select Model", choices=[m for m in models], type="index", value=current_model, interactive=True)
|
117 |
with gr.Row():
|
118 |
with gr.Column(style="width=800px"):
|
119 |
output1=gr.Image(label=(f"{current_model}"))
|
120 |
|
121 |
-
|
122 |
with gr.Row():
|
123 |
with gr.Column(scale=50):
|
124 |
input_text=gr.Textbox(label="Prompt Idea",lines=2)
|
125 |
use_short=gr.Button("Use Short Prompt")
|
126 |
see_prompts=gr.Button("Extend Idea")
|
127 |
|
128 |
-
|
129 |
def short_prompt(inputs):
|
130 |
return(inputs)
|
131 |
|
132 |
model_name1.change(set_model,inputs=model_name1,outputs=[output1])
|
133 |
-
|
134 |
run.click(send_it1, inputs=[magic1, model_name1], outputs=[output1])
|
135 |
-
|
136 |
use_short.click(short_prompt,inputs=[input_text],outputs=magic1)
|
137 |
-
|
138 |
see_prompts.click(text_it1,inputs=[input_text],outputs=magic1)
|
139 |
|
140 |
myface.queue(concurrency_count=200)
|
|
|
55 |
""")
|
56 |
with gr.Row():
|
57 |
with gr.Tab("Title"):
|
58 |
+
gr.HTML("""<title>Prompt to Generate Image</title><div style="text-align: center; max-width: 1500px; margin: 0 auto;">
|
59 |
+
<h1>Enter a Prompt in Textbox then click Generate Image</h1>""")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
|
61 |
with gr.Tab("Tools"):
|
62 |
with gr.Tab("View"):
|
|
|
66 |
with gr.Column(style="width=50%, height=70%"):
|
67 |
gr.Pil(label="Crop")
|
68 |
|
|
|
69 |
with gr.Tab("Draw"):
|
70 |
with gr.Column(style="width=50%, height=70%"):
|
71 |
gr.Pil(label="Crop")
|
72 |
with gr.Column(style="width=50%, height=70%"):
|
73 |
gr.Pil(label="Draw")
|
|
|
|
|
74 |
gr.ImagePaint(label="Draw")
|
75 |
|
76 |
with gr.Tab("Text"):
|
77 |
with gr.Row():
|
|
|
78 |
with gr.Column(scale=50):
|
79 |
gr.Textbox(label="", lines=8, interactive=True)
|
|
|
|
|
80 |
with gr.Column(scale=50):
|
81 |
gr.Textbox(label="", lines=8, interactive=True)
|
82 |
|
83 |
with gr.Tab("Color Picker"):
|
84 |
with gr.Row():
|
|
|
85 |
with gr.Column(scale=50):
|
86 |
gr.ColorPicker(label="Color", interactive=True)
|
|
|
|
|
87 |
with gr.Column(scale=50):
|
88 |
gr.ImagePaint(label="Draw", interactive=True)
|
89 |
with gr.Row():
|
|
|
92 |
run=gr.Button("Generate Image")
|
93 |
with gr.Row():
|
94 |
with gr.Column(scale=100):
|
|
|
95 |
model_name1 = gr.Dropdown(label="Select Model", choices=[m for m in models], type="index", value=current_model, interactive=True)
|
96 |
with gr.Row():
|
97 |
with gr.Column(style="width=800px"):
|
98 |
output1=gr.Image(label=(f"{current_model}"))
|
99 |
|
|
|
100 |
with gr.Row():
|
101 |
with gr.Column(scale=50):
|
102 |
input_text=gr.Textbox(label="Prompt Idea",lines=2)
|
103 |
use_short=gr.Button("Use Short Prompt")
|
104 |
see_prompts=gr.Button("Extend Idea")
|
105 |
|
|
|
106 |
def short_prompt(inputs):
|
107 |
return(inputs)
|
108 |
|
109 |
model_name1.change(set_model,inputs=model_name1,outputs=[output1])
|
|
|
110 |
run.click(send_it1, inputs=[magic1, model_name1], outputs=[output1])
|
|
|
111 |
use_short.click(short_prompt,inputs=[input_text],outputs=magic1)
|
|
|
112 |
see_prompts.click(text_it1,inputs=[input_text],outputs=magic1)
|
113 |
|
114 |
myface.queue(concurrency_count=200)
|