Spaces:
Running
Running
admin
commited on
Commit
·
f723eb2
1
Parent(s):
d613312
fix err msg
Browse files
app.py
CHANGED
@@ -114,7 +114,7 @@ def format_second(seconds):
|
|
114 |
|
115 |
def infer(audio_path: str, log_name: str):
|
116 |
if not audio_path:
|
117 |
-
return
|
118 |
|
119 |
backbone = "_".join(log_name.split("_")[:-1])
|
120 |
spec = log_name.split("_")[-1]
|
@@ -139,7 +139,7 @@ def infer(audio_path: str, log_name: str):
|
|
139 |
)
|
140 |
|
141 |
except Exception as e:
|
142 |
-
return
|
143 |
|
144 |
input_size = eval_net.get_input_size()
|
145 |
embeded_input = embed(input, input_size)
|
|
|
114 |
|
115 |
def infer(audio_path: str, log_name: str):
|
116 |
if not audio_path:
|
117 |
+
return "Please input an audio!", None
|
118 |
|
119 |
backbone = "_".join(log_name.split("_")[:-1])
|
120 |
spec = log_name.split("_")[-1]
|
|
|
139 |
)
|
140 |
|
141 |
except Exception as e:
|
142 |
+
return f"{e}", None
|
143 |
|
144 |
input_size = eval_net.get_input_size()
|
145 |
embeded_input = embed(input, input_size)
|