Update app.py
Browse files
app.py
CHANGED
@@ -43,6 +43,9 @@ def infer(prompt, seed=42, randomize_seed=False, width=1024, height=1024, guidan
|
|
43 |
return image, seed
|
44 |
|
45 |
generative_api = APIClient()
|
|
|
|
|
|
|
46 |
|
47 |
examples = [
|
48 |
"a tiny astronaut hatching from an egg on the moon",
|
@@ -55,6 +58,25 @@ css="""
|
|
55 |
margin: 0 auto;
|
56 |
max-width: 520px;
|
57 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
"""
|
59 |
|
60 |
with gr.Blocks(css=css) as demo:
|
@@ -64,15 +86,14 @@ with gr.Blocks(css=css) as demo:
|
|
64 |
12B param rectified flow transformer guidance-distilled from [FLUX.1 [pro]](https://blackforestlabs.ai/)
|
65 |
[[non-commercial license](https://huggingface.co/black-forest-labs/FLUX.1-dev/blob/main/LICENSE.md)] [[blog](https://blackforestlabs.ai/announcing-black-forest-labs/)] [[model](https://huggingface.co/black-forest-labs/FLUX.1-dev)]
|
66 |
""")
|
67 |
-
|
68 |
with gr.Row():
|
69 |
|
70 |
prompt = gr.Text(
|
71 |
label="Prompt",
|
72 |
show_label=False,
|
73 |
max_lines=1,
|
74 |
-
placeholder="Enter your prompt"
|
75 |
-
container=False,
|
76 |
)
|
77 |
|
78 |
run_button = gr.Button("Run", scale=0)
|
|
|
43 |
return image, seed
|
44 |
|
45 |
generative_api = APIClient()
|
46 |
+
|
47 |
+
with open("header.html", "r") as file:
|
48 |
+
header = file.read()
|
49 |
|
50 |
examples = [
|
51 |
"a tiny astronaut hatching from an egg on the moon",
|
|
|
58 |
margin: 0 auto;
|
59 |
max-width: 520px;
|
60 |
}
|
61 |
+
.image-container img {
|
62 |
+
max-width: 512px;
|
63 |
+
max-height: 512px;
|
64 |
+
margin: 0 auto;
|
65 |
+
border-radius: 0px;
|
66 |
+
}
|
67 |
+
|
68 |
+
.is-custom-button {
|
69 |
+
background-color: #3a4454;
|
70 |
+
border-color: #4b5563;
|
71 |
+
}
|
72 |
+
|
73 |
+
@media (prefers-color-scheme: light) {
|
74 |
+
.is-custom-button {
|
75 |
+
background-color: #f3f4f6;
|
76 |
+
border-color: #e5e7eb;
|
77 |
+
}
|
78 |
+
}
|
79 |
+
|
80 |
"""
|
81 |
|
82 |
with gr.Blocks(css=css) as demo:
|
|
|
86 |
12B param rectified flow transformer guidance-distilled from [FLUX.1 [pro]](https://blackforestlabs.ai/)
|
87 |
[[non-commercial license](https://huggingface.co/black-forest-labs/FLUX.1-dev/blob/main/LICENSE.md)] [[blog](https://blackforestlabs.ai/announcing-black-forest-labs/)] [[model](https://huggingface.co/black-forest-labs/FLUX.1-dev)]
|
88 |
""")
|
89 |
+
gr.HTML(header)
|
90 |
with gr.Row():
|
91 |
|
92 |
prompt = gr.Text(
|
93 |
label="Prompt",
|
94 |
show_label=False,
|
95 |
max_lines=1,
|
96 |
+
placeholder="Enter your prompt"
|
|
|
97 |
)
|
98 |
|
99 |
run_button = gr.Button("Run", scale=0)
|