helloWorld199 commited on
Commit
fcf6dd7
·
verified ·
1 Parent(s): f5786af

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -7
app.py CHANGED
@@ -47,14 +47,18 @@ CACHE_EXAMPLES = os.getenv('CACHE_EXAMPLES', '1') == '1'
47
  def analyze(path):
48
  #Measure time for inference
49
  start = time.time()
50
-
51
- path = Path(path)
52
- result, stems_paths = allin1.analyze(
53
- path,
54
- out_dir='./struct',
55
- multiprocess=False,
56
- keep_byproducts=True, # TODO: remove this
 
57
  )
 
 
 
58
  #stems_paths_string =""
59
  #for stem in stems_paths:
60
  # stems_paths_string += stem + '\n'
 
47
  def analyze(path):
48
  #Measure time for inference
49
  start = time.time()
50
+
51
+ try:
52
+ path = Path(path)
53
+ result, stems_paths = allin1.analyze(
54
+ path,
55
+ out_dir='./struct',
56
+ multiprocess=False,
57
+ keep_byproducts=True, # TODO: remove this
58
  )
59
+ except error:
60
+ print(error)
61
+
62
  #stems_paths_string =""
63
  #for stem in stems_paths:
64
  # stems_paths_string += stem + '\n'