Spaces:
Running
Running
Update gradio_app.py
Browse files- gradio_app.py +1 -11
gradio_app.py
CHANGED
@@ -15,14 +15,7 @@ def process_svg(uploaded_file):
|
|
15 |
if not os.path.exists('tempDir'):
|
16 |
os.mkdir('tempDir')
|
17 |
|
18 |
-
path = os.path.join('tempDir', uploaded_file.name)
|
19 |
targetPath = os.path.join('tempDir', uploaded_file.name[:-4] + "_animated.svg")
|
20 |
-
|
21 |
-
'''
|
22 |
-
with open(path, "wb") as f:
|
23 |
-
f.write(uploaded_file.read())
|
24 |
-
shutil.copy2(uploaded_file.name, path)
|
25 |
-
'''
|
26 |
|
27 |
sys.setrecursionlimit(1500)
|
28 |
success = animateLogo(uploaded_file.name, targetPath)
|
@@ -35,10 +28,7 @@ def process_svg(uploaded_file):
|
|
35 |
iface = gr.Interface(
|
36 |
fn=process_svg,
|
37 |
inputs=gr.File(label="Upload SVG file", file_types=[".svg"]),
|
38 |
-
outputs=
|
39 |
-
gr.File(label="Download animated SVG"),
|
40 |
-
gr.Textbox(label="Status")
|
41 |
-
],
|
42 |
title="SVG Animation Tool",
|
43 |
description="Upload an SVG file to animate it using DeepSVG library"
|
44 |
)
|
|
|
15 |
if not os.path.exists('tempDir'):
|
16 |
os.mkdir('tempDir')
|
17 |
|
|
|
18 |
targetPath = os.path.join('tempDir', uploaded_file.name[:-4] + "_animated.svg")
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
|
20 |
sys.setrecursionlimit(1500)
|
21 |
success = animateLogo(uploaded_file.name, targetPath)
|
|
|
28 |
iface = gr.Interface(
|
29 |
fn=process_svg,
|
30 |
inputs=gr.File(label="Upload SVG file", file_types=[".svg"]),
|
31 |
+
outputs=gr.File(label="Download animated SVG"),
|
|
|
|
|
|
|
32 |
title="SVG Animation Tool",
|
33 |
description="Upload an SVG file to animate it using DeepSVG library"
|
34 |
)
|