svjack commited on
Commit
767e123
·
verified ·
1 Parent(s): b549d4a

Update gradio_app.py

Browse files
Files changed (1) hide show
  1. gradio_app.py +5 -1
gradio_app.py CHANGED
@@ -2,6 +2,7 @@ import gradio as gr
2
  import os
3
  import sys
4
  from animationPipeline import animateLogo
 
5
 
6
  def process_svg(uploaded_file):
7
  if uploaded_file is None:
@@ -16,9 +17,12 @@ def process_svg(uploaded_file):
16
 
17
  path = os.path.join('tempDir', uploaded_file.name)
18
  targetPath = os.path.join('tempDir', uploaded_file.name[:-4] + "_animated.svg")
19
-
 
20
  with open(path, "wb") as f:
21
  f.write(uploaded_file.read())
 
 
22
 
23
  sys.setrecursionlimit(1500)
24
  success = animateLogo(path, targetPath)
 
2
  import os
3
  import sys
4
  from animationPipeline import animateLogo
5
+ import shutil
6
 
7
  def process_svg(uploaded_file):
8
  if uploaded_file is None:
 
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
+ '''
25
+ shutil.copy2(uploaded_file.name, path)
26
 
27
  sys.setrecursionlimit(1500)
28
  success = animateLogo(path, targetPath)