Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -14,6 +14,9 @@ SAVE_DIR = "saved_images" # Gradio will handle the persistence
|
|
14 |
if not os.path.exists(SAVE_DIR):
|
15 |
os.makedirs(SAVE_DIR, exist_ok=True)
|
16 |
|
|
|
|
|
|
|
17 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
18 |
repo_id = "black-forest-labs/FLUX.1-dev"
|
19 |
adapter_id = "strangerzonehf/Ctoon-Plus-Plus"
|
@@ -130,7 +133,12 @@ with gr.Blocks(theme=gr.themes.Soft(), css=css, analytics_enabled=False) as demo
|
|
130 |
)
|
131 |
run_button = gr.Button("Run", scale=0)
|
132 |
|
133 |
-
|
|
|
|
|
|
|
|
|
|
|
134 |
|
135 |
with gr.Accordion("Advanced Settings", open=False):
|
136 |
seed = gr.Slider(
|
|
|
14 |
if not os.path.exists(SAVE_DIR):
|
15 |
os.makedirs(SAVE_DIR, exist_ok=True)
|
16 |
|
17 |
+
# Load the default image
|
18 |
+
DEFAULT_IMAGE_PATH = "cover1.webp"
|
19 |
+
|
20 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
21 |
repo_id = "black-forest-labs/FLUX.1-dev"
|
22 |
adapter_id = "strangerzonehf/Ctoon-Plus-Plus"
|
|
|
133 |
)
|
134 |
run_button = gr.Button("Run", scale=0)
|
135 |
|
136 |
+
# Modified to include the default image
|
137 |
+
result = gr.Image(
|
138 |
+
label="Result",
|
139 |
+
show_label=False,
|
140 |
+
value=DEFAULT_IMAGE_PATH # Set the default image
|
141 |
+
)
|
142 |
|
143 |
with gr.Accordion("Advanced Settings", open=False):
|
144 |
seed = gr.Slider(
|