Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,24 +1,21 @@
|
|
1 |
import gradio as gr
|
2 |
|
3 |
-
# 模拟图像生成函数(实际上不生成图像)
|
4 |
def generate_image(prompt):
|
5 |
return f"Image would be generated based on: {prompt}"
|
6 |
|
7 |
-
# 定义更多的示例
|
8 |
examples = [
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
]
|
20 |
|
21 |
-
# 创建Gradio接口
|
22 |
demo = gr.Interface(
|
23 |
fn=generate_image,
|
24 |
inputs=gr.Textbox(placeholder="Enter your prompt here", label="Image Prompt"),
|
@@ -26,5 +23,7 @@ demo = gr.Interface(
|
|
26 |
title="FLUX.1 [dev] Image Generation Interface",
|
27 |
description="Enter a text prompt to generate an image. (Note: This is a demo interface and doesn't actually generate images)",
|
28 |
examples=examples,
|
29 |
-
theme=gr.themes.Soft()
|
30 |
-
)
|
|
|
|
|
|
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"),
|
|
|
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()
|