Update app.py
Browse files
app.py
CHANGED
|
@@ -38,6 +38,12 @@ def handle_color_mode(value):
|
|
| 38 |
return value
|
| 39 |
|
| 40 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
css = """
|
| 42 |
#col-container {
|
| 43 |
margin: 0 auto;
|
|
@@ -88,6 +94,11 @@ with gr.Blocks(css=css) as app:
|
|
| 88 |
with gr.Column():
|
| 89 |
html = gr.HTML(label="SVG Output") # container=True, show_label=True
|
| 90 |
svg_output = gr.File(label="Download SVG")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 91 |
# Store default values for restoration
|
| 92 |
colormode.change(handle_color_mode, inputs=colormode,outputs=output_text)
|
| 93 |
hierarchical.change(handle_color_mode, inputs=hierarchical,outputs=output_text)
|
|
|
|
| 38 |
return value
|
| 39 |
|
| 40 |
|
| 41 |
+
examples = [
|
| 42 |
+
"examples/01.jpg",
|
| 43 |
+
"examples/02.jpg",
|
| 44 |
+
"examples/03.jpg",
|
| 45 |
+
]
|
| 46 |
+
|
| 47 |
css = """
|
| 48 |
#col-container {
|
| 49 |
margin: 0 auto;
|
|
|
|
| 94 |
with gr.Column():
|
| 95 |
html = gr.HTML(label="SVG Output") # container=True, show_label=True
|
| 96 |
svg_output = gr.File(label="Download SVG")
|
| 97 |
+
|
| 98 |
+
gr.Examples(
|
| 99 |
+
examples = examples,
|
| 100 |
+
inputs = [image_input],
|
| 101 |
+
)
|
| 102 |
# Store default values for restoration
|
| 103 |
colormode.change(handle_color_mode, inputs=colormode,outputs=output_text)
|
| 104 |
hierarchical.change(handle_color_mode, inputs=hierarchical,outputs=output_text)
|