Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -64,7 +64,13 @@ def infer(
|
|
64 |
).images[0]
|
65 |
|
66 |
return image
|
67 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
|
69 |
# Define the custom theme with input styles
|
70 |
class CustomTheme(gr.themes.Base):
|
@@ -124,6 +130,7 @@ input[type="checkbox"]:checked {
|
|
124 |
}
|
125 |
"""
|
126 |
|
|
|
127 |
with gr.Blocks(theme=CustomTheme(), css=css) as demo:
|
128 |
with gr.Column(elem_id="col-container"):
|
129 |
# Make "Prompt" bold using Markdown syntax and assign a class
|
@@ -147,8 +154,7 @@ with gr.Blocks(theme=CustomTheme(), css=css) as demo:
|
|
147 |
|
148 |
result = gr.Image(label="Result", show_label=False)
|
149 |
|
150 |
-
|
151 |
-
|
152 |
gr.Examples(
|
153 |
examples=examples,
|
154 |
inputs=[prompt],
|
@@ -169,11 +175,10 @@ with gr.Blocks(theme=CustomTheme(), css=css) as demo:
|
|
169 |
outputs=[result],
|
170 |
)
|
171 |
|
172 |
-
|
173 |
if __name__ == "__main__":
|
174 |
demo.launch(
|
175 |
server_name="0.0.0.0",
|
176 |
server_port=7860,
|
177 |
share=True,
|
178 |
show_api=False
|
179 |
-
)
|
|
|
64 |
).images[0]
|
65 |
|
66 |
return image
|
67 |
+
|
68 |
+
# Примеры для интерфейса
|
69 |
+
examples = [
|
70 |
+
"A full-body depiction of a futuristic cyberpunk warrior wearing neon armor with intricate details, holding a sleek glowing katana in a ready stance. The character stands confidently with glowing eyes and a dynamic pose that exudes strength and mystery. Isolated on a clean, transparent, or neutral background to emphasize the character's design and details, with subtle reflections and lighting to enhance the neon glow and textures.",
|
71 |
+
"A lush fantasy forest with glowing mushrooms, magical fireflies, and a small elf standing by an ancient tree, surrounded by mystical mist.",
|
72 |
+
"A dystopian cityscape at night with flying cars, neon holographic advertisements, and a lone figure standing on a rooftop, looking at the skyline."
|
73 |
+
]
|
74 |
|
75 |
# Define the custom theme with input styles
|
76 |
class CustomTheme(gr.themes.Base):
|
|
|
130 |
}
|
131 |
"""
|
132 |
|
133 |
+
# Создание интерфейса Gradio
|
134 |
with gr.Blocks(theme=CustomTheme(), css=css) as demo:
|
135 |
with gr.Column(elem_id="col-container"):
|
136 |
# Make "Prompt" bold using Markdown syntax and assign a class
|
|
|
154 |
|
155 |
result = gr.Image(label="Result", show_label=False)
|
156 |
|
157 |
+
# Добавляем примеры
|
|
|
158 |
gr.Examples(
|
159 |
examples=examples,
|
160 |
inputs=[prompt],
|
|
|
175 |
outputs=[result],
|
176 |
)
|
177 |
|
|
|
178 |
if __name__ == "__main__":
|
179 |
demo.launch(
|
180 |
server_name="0.0.0.0",
|
181 |
server_port=7860,
|
182 |
share=True,
|
183 |
show_api=False
|
184 |
+
)
|