Skip to content

Commit f456ca5

Browse files
committed
Add page title setting
1 parent 1892f68 commit f456ca5

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

web-apps/flux-image-gen/gradio_ui.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ class Model(BaseModel):
1818

1919
class AppSettings(BaseModel):
2020
models: List[Model]
21-
example_prompt: str
21+
example_prompt: str = "Yoda riding a skateboard."
22+
title = "Flux Image Generation Demo"
23+
2224

2325

2426
settings_path = pathlib.Path("/etc/gradio-app/gradio_config.yaml")
@@ -93,9 +95,8 @@ async def generate_image(
9395

9496
return image, seed, filename, None
9597

96-
97-
with gr.Blocks() as demo:
98-
gr.Markdown("# Flux Image Generation Demo")
98+
with gr.Blocks(title=settings.title) as demo:
99+
gr.Markdown(f"# {settings.title}")
99100

100101
with gr.Row():
101102
with gr.Column():

0 commit comments

Comments
 (0)