Rooc commited on
Commit
dc0e781
·
verified ·
1 Parent(s): f1b8ac6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -28
app.py CHANGED
@@ -1,29 +1,16 @@
1
- import gradio as gr
2
 
3
- def generate_image(prompt):
4
- return f"Image would be generated based on: {prompt}"
5
-
6
- examples = [
7
- "A beautiful sunset over a calm ocean",
8
- "A futuristic cityscape with flying cars",
9
- "A serene forest scene with a babbling brook",
10
- "An abstract representation of love with swirling colors",
11
- "A cat playing with a ball of yarn in a cozy living room",
12
- "A majestic mountain range under a starry night sky",
13
- "A bustling farmer's market with colorful produce",
14
- "A steampunk-inspired clockwork mechanism",
15
- "A tranquil Japanese garden with a koi pond",
16
- "A whimsical treehouse in an enchanted forest"
17
- ]
18
-
19
- demo = gr.Interface(
20
- fn=generate_image,
21
- inputs=gr.Textbox(placeholder="Enter your prompt here", label="Image Prompt"),
22
- outputs=gr.Textbox(label="Generated Image Description"),
23
- title="FLUX.1 [dev] Image Generation Interface",
24
- description="Enter a text prompt to generate an image. (Note: This is a demo interface and doesn't actually generate images)",
25
- examples=examples,
26
- theme=gr.themes.Soft()
27
- )
28
-
29
- demo.launch()
 
1
+ import gradio as gr
2
 
3
+ gr.load("models/black-forest-labs/FLUX.1-dev").launch(
4
+ examples=[
5
+ ["A beautiful sunset over a calm ocean"],
6
+ ["A futuristic cityscape with flying cars"],
7
+ ["A serene forest scene with a babbling brook"],
8
+ ["An abstract representation of love with swirling colors"],
9
+ ["A cat playing with a ball of yarn in a cozy living room"],
10
+ ["A majestic mountain range under a starry night sky"],
11
+ ["A bustling farmer's market with colorful produce"],
12
+ ["A steampunk-inspired clockwork mechanism"],
13
+ ["A tranquil Japanese garden with a koi pond"],
14
+ ["A whimsical treehouse in an enchanted forest"]
15
+ ]
16
+ )