Richtefee commited on
Commit
6ec5b18
β€’
1 Parent(s): 919736e

Rename png2svg.py to app.py

Browse files
Files changed (1) hide show
  1. png2svg.py β†’ app.py +3 -9
png2svg.py β†’ app.py RENAMED
@@ -52,12 +52,6 @@ def png2svg(png_file,png_b64,svg_file,
52
  vtracer.convert_image_to_svg_py(png_file, svg_file, **params)
53
  return svg_file
54
 
55
-
56
- # Example Data
57
- img = Image.open('./example.png')
58
- img_b64 = im_2_b64(img)
59
-
60
-
61
  # Interface
62
  with gr.Blocks() as interface:
63
  # Title
@@ -68,7 +62,7 @@ with gr.Blocks() as interface:
68
  with gr.Accordion("File IO"):
69
  # file io
70
  png_file = gr.File(label = "Input file")
71
- png_b64 = gr.Textbox(label = "Input image b64", value=img_b64)
72
  svg_file = gr.Textbox(label = "Output file", placeholder="out.svg")
73
 
74
  # Parameters
@@ -167,6 +161,6 @@ with gr.Blocks() as interface:
167
  path_precision],
168
  out_file)
169
 
170
- if __name__ == '__main__':
171
- interface.launch()
172
 
 
52
  vtracer.convert_image_to_svg_py(png_file, svg_file, **params)
53
  return svg_file
54
 
 
 
 
 
 
 
55
  # Interface
56
  with gr.Blocks() as interface:
57
  # Title
 
62
  with gr.Accordion("File IO"):
63
  # file io
64
  png_file = gr.File(label = "Input file")
65
+ png_b64 = gr.Textbox(label = "Input image b64")
66
  svg_file = gr.Textbox(label = "Output file", placeholder="out.svg")
67
 
68
  # Parameters
 
161
  path_precision],
162
  out_file)
163
 
164
+
165
+ interface.launch()
166