seawolf2357
commited on
Commit
•
86ef698
1
Parent(s):
8f6c590
Update app.py
Browse files
app.py
CHANGED
@@ -16,18 +16,8 @@ HF_TOKEN = os.environ.get("HF_TOKEN", None)
|
|
16 |
model = "black-forest-labs/FLUX.1-dev"
|
17 |
MAX_SEED = np.iinfo(np.int32).max
|
18 |
|
19 |
-
|
20 |
-
|
21 |
-
visibility: hidden;
|
22 |
-
}
|
23 |
-
"""
|
24 |
-
|
25 |
-
JS = """function () {
|
26 |
-
gradioURL = window.location.href
|
27 |
-
if (!gradioURL.endsWith('?__theme=dark')) {
|
28 |
-
window.location.replace(gradioURL + '?__theme=dark');
|
29 |
-
}
|
30 |
-
}"""
|
31 |
|
32 |
if torch.cuda.is_available():
|
33 |
pipe = FluxPipeline.from_pretrained(model, torch_dtype=torch.bfloat16)
|
@@ -97,9 +87,7 @@ examples = [
|
|
97 |
|
98 |
# Gradio Interface
|
99 |
|
100 |
-
with gr.Blocks(
|
101 |
-
gr.HTML("<h1><center>Flux Labs</center></h1>")
|
102 |
-
gr.HTML("<p><center>Model Now: Shakker-Labs/FLUX.1-dev-LoRA-blended-realistic-illustration<br>🙇♂️Frequent model changes</center></p>")
|
103 |
with gr.Row():
|
104 |
with gr.Column(scale=4):
|
105 |
img = gr.Gallery(label='flux Generated Image', columns = 1, preview=True, height=600)
|
|
|
16 |
model = "black-forest-labs/FLUX.1-dev"
|
17 |
MAX_SEED = np.iinfo(np.int32).max
|
18 |
|
19 |
+
|
20 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
|
22 |
if torch.cuda.is_available():
|
23 |
pipe = FluxPipeline.from_pretrained(model, torch_dtype=torch.bfloat16)
|
|
|
87 |
|
88 |
# Gradio Interface
|
89 |
|
90 |
+
with gr.Blocks() as demo:
|
|
|
|
|
91 |
with gr.Row():
|
92 |
with gr.Column(scale=4):
|
93 |
img = gr.Gallery(label='flux Generated Image', columns = 1, preview=True, height=600)
|