Fix gradio 6 API: drop show_download_button, theme/css to launch()
Browse files
app.py
CHANGED
|
@@ -270,7 +270,7 @@ BS_THEME = gr.themes.Base(
|
|
| 270 |
|
| 271 |
|
| 272 |
# ----------------------------------------------------------------------------- UI
|
| 273 |
-
with gr.Blocks(title="Build Small — Certificate Generator"
|
| 274 |
gr.HTML(
|
| 275 |
"""
|
| 276 |
<div class="bs-hero">
|
|
@@ -314,7 +314,7 @@ with gr.Blocks(title="Build Small — Certificate Generator", theme=BS_THEME, cs
|
|
| 314 |
generate_btn = gr.Button("Generate my certificate", variant="primary", size="lg")
|
| 315 |
|
| 316 |
gr.HTML('<div class="bs-section">Your certificate</div>')
|
| 317 |
-
certificate_image = gr.Image(label="Preview", type="filepath", interactive=False
|
| 318 |
certificate_file = gr.File(label="Download (PNG)", interactive=False)
|
| 319 |
generation_status = gr.Markdown("")
|
| 320 |
|
|
@@ -341,4 +341,4 @@ with gr.Blocks(title="Build Small — Certificate Generator", theme=BS_THEME, cs
|
|
| 341 |
|
| 342 |
|
| 343 |
if __name__ == "__main__":
|
| 344 |
-
demo.launch()
|
|
|
|
| 270 |
|
| 271 |
|
| 272 |
# ----------------------------------------------------------------------------- UI
|
| 273 |
+
with gr.Blocks(title="Build Small — Certificate Generator") as demo:
|
| 274 |
gr.HTML(
|
| 275 |
"""
|
| 276 |
<div class="bs-hero">
|
|
|
|
| 314 |
generate_btn = gr.Button("Generate my certificate", variant="primary", size="lg")
|
| 315 |
|
| 316 |
gr.HTML('<div class="bs-section">Your certificate</div>')
|
| 317 |
+
certificate_image = gr.Image(label="Preview", type="filepath", interactive=False)
|
| 318 |
certificate_file = gr.File(label="Download (PNG)", interactive=False)
|
| 319 |
generation_status = gr.Markdown("")
|
| 320 |
|
|
|
|
| 341 |
|
| 342 |
|
| 343 |
if __name__ == "__main__":
|
| 344 |
+
demo.launch(theme=BS_THEME, css=CUSTOM_CSS)
|