Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -97,6 +97,7 @@ def generate(
|
|
| 97 |
num_inference_steps: int = 26,
|
| 98 |
sampler: str = "Eul""er a",
|
| 99 |
clip_skip: int = 1,
|
|
|
|
| 100 |
):
|
| 101 |
"""
|
| 102 |
if torch.cuda.is_available():
|
|
@@ -147,19 +148,50 @@ else:
|
|
| 147 |
pipe = None
|
| 148 |
|
| 149 |
with gr.Blocks(
|
| 150 |
-
theme=gr.themes.
|
| 151 |
) as demo:
|
| 152 |
-
gr.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 153 |
|
| 154 |
with gr.Group():
|
| 155 |
prompt = gr.Text(
|
|
|
|
| 156 |
label="Prompt",
|
| 157 |
-
placeholder="
|
| 158 |
)
|
| 159 |
|
| 160 |
negative_prompt = gr.Text(
|
|
|
|
| 161 |
label="Negative Prompt",
|
| 162 |
-
placeholder="(Optional)
|
| 163 |
)
|
| 164 |
|
| 165 |
with gr.Row():
|
|
|
|
| 97 |
num_inference_steps: int = 26,
|
| 98 |
sampler: str = "Eul""er a",
|
| 99 |
clip_skip: int = 1,
|
| 100 |
+
progress=gr.Progress(track_tqdm=True),
|
| 101 |
):
|
| 102 |
"""
|
| 103 |
if torch.cuda.is_available():
|
|
|
|
| 148 |
pipe = None
|
| 149 |
|
| 150 |
with gr.Blocks(
|
| 151 |
+
theme=gr.themes.Base()
|
| 152 |
) as demo:
|
| 153 |
+
gr.HTML(
|
| 154 |
+
"""
|
| 155 |
+
<style>
|
| 156 |
+
.title-container {
|
| 157 |
+
display: flex;
|
| 158 |
+
justify-content: center;
|
| 159 |
+
align-items: center;
|
| 160 |
+
height: 80vh; /* Adjust this value to position the title vertically */
|
| 161 |
+
}
|
| 162 |
+
.title {
|
| 163 |
+
font-size: 1.5em;
|
| 164 |
+
text-align: center;
|
| 165 |
+
color: #333;
|
| 166 |
+
font-family: 'Helvetica Neue', sans-serif;
|
| 167 |
+
text-transform: uppercase;
|
| 168 |
+
letter-spacing: 0.1em;
|
| 169 |
+
padding: 0.5em 0;
|
| 170 |
+
background: transparent;
|
| 171 |
+
}
|
| 172 |
+
.title span {
|
| 173 |
+
background: -webkit-linear-gradient(45deg, #FFBF00, #F28C28);
|
| 174 |
+
-webkit-background-clip: text;
|
| 175 |
+
-webkit-text-fill-color: transparent;
|
| 176 |
+
}
|
| 177 |
+
</style>
|
| 178 |
+
|
| 179 |
+
<h1 class="title"><span>Starry XL 5.2</span></h1>
|
| 180 |
+
<p>This is a simple demo for <strong>Starry XL</strong>. Feel free to report any issue at Community tab.</p>
|
| 181 |
+
"""
|
| 182 |
+
)
|
| 183 |
|
| 184 |
with gr.Group():
|
| 185 |
prompt = gr.Text(
|
| 186 |
+
info="Your prompt here OwO",
|
| 187 |
label="Prompt",
|
| 188 |
+
placeholder="Tips: Follow the instruction at the model page for better prompt."
|
| 189 |
)
|
| 190 |
|
| 191 |
negative_prompt = gr.Text(
|
| 192 |
+
info="Enter your negative prompt here"
|
| 193 |
label="Negative Prompt",
|
| 194 |
+
placeholder="(Optional)"
|
| 195 |
)
|
| 196 |
|
| 197 |
with gr.Row():
|