Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,28 +1,3 @@
|
|
1 |
import gradio as gr
|
2 |
|
3 |
-
# 定义更多的示例
|
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 |
-
|
17 |
-
# 创建新的接口,添加示例
|
18 |
-
demo = gr.Interface(
|
19 |
-
fn=model.predict,
|
20 |
-
inputs=model.input_components,
|
21 |
-
outputs=model.output_components,
|
22 |
-
examples=examples,
|
23 |
-
title="FLUX.1 [dev] Image Generation",
|
24 |
-
description="Enter a text prompt to generate an image using FLUX.1 [dev]."
|
25 |
-
)
|
26 |
-
|
27 |
-
# 加载模型
|
28 |
model = gr.load("models/black-forest-labs/FLUX.1-dev").launch()
|
|
|
1 |
import gradio as gr
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
model = gr.load("models/black-forest-labs/FLUX.1-dev").launch()
|