weepakistan commited on
Commit
bbf7bd0
·
verified ·
1 Parent(s): d541579

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -38,10 +38,9 @@ def convert_image(image, color_mode, hierarchical, mode, filter_speckle,
38
 
39
  return gr.HTML(f'<svg viewBox="0 0 {image.width} {image.height}">{svg_str}</svg>'), temp_file.name
40
 
41
-
42
-
43
  app = gr.Interface(
44
- fn=convert_image, inputs=[
 
45
  gr.Image(type="pil", label="Upload Image"),
46
  gr.Radio(choices=["Color", "Binary"], value="Color", label="Color Mode"),
47
  gr.Radio(choices=["Stacked", "Cutout"], value="Stacked", label="Hierarchical"),
@@ -54,12 +53,13 @@ app = gr.Interface(
54
  gr.Slider(minimum=1, maximum=20, value=10, step=1, label="Max Iterations"),
55
  gr.Slider(minimum=10, maximum=90, value=45, step=1, label="Splice Threshold"),
56
  gr.Slider(minimum=1, maximum=10, value=8, step=1, label="Path Precision")
57
- ], outputs=[
 
58
  gr.HTML(label="SVG Output"),
59
  gr.File(label="Download SVG")
60
  ],
61
  title="Convert Image to SVG vectors",
62
- description="Upload an image and customize the conversion parameters as needed.",
63
  )
64
- )
65
- app.launch()
 
38
 
39
  return gr.HTML(f'<svg viewBox="0 0 {image.width} {image.height}">{svg_str}</svg>'), temp_file.name
40
 
 
 
41
  app = gr.Interface(
42
+ fn=convert_image,
43
+ inputs=[
44
  gr.Image(type="pil", label="Upload Image"),
45
  gr.Radio(choices=["Color", "Binary"], value="Color", label="Color Mode"),
46
  gr.Radio(choices=["Stacked", "Cutout"], value="Stacked", label="Hierarchical"),
 
53
  gr.Slider(minimum=1, maximum=20, value=10, step=1, label="Max Iterations"),
54
  gr.Slider(minimum=10, maximum=90, value=45, step=1, label="Splice Threshold"),
55
  gr.Slider(minimum=1, maximum=10, value=8, step=1, label="Path Precision")
56
+ ],
57
+ outputs=[
58
  gr.HTML(label="SVG Output"),
59
  gr.File(label="Download SVG")
60
  ],
61
  title="Convert Image to SVG vectors",
62
+ description="Upload an image and customize the conversion parameters as needed."
63
  )
64
+
65
+ app.launch()