Spaces:
Runtime error
Runtime error
Commit
·
e907f73
1
Parent(s):
7df0355
minor fixes
Browse files
app.py
CHANGED
|
@@ -74,6 +74,7 @@ def process_uploaded_file(
|
|
| 74 |
num_active_paths=num_active_paths,
|
| 75 |
)
|
| 76 |
except Exception as e:
|
|
|
|
| 77 |
return "", build_html_output(str(e), "result_item_error")
|
| 78 |
|
| 79 |
|
|
@@ -102,6 +103,7 @@ def process_microphone(
|
|
| 102 |
num_active_paths=num_active_paths,
|
| 103 |
)
|
| 104 |
except Exception as e:
|
|
|
|
| 105 |
return "", build_html_output(str(e), "result_item_error")
|
| 106 |
|
| 107 |
|
|
@@ -157,7 +159,7 @@ def process(
|
|
| 157 |
info = f"""
|
| 158 |
Wave duration : {duration: .3f} s <br/>
|
| 159 |
Processing time: {end - start: .3f} s <br/>
|
| 160 |
-
RTF: {end - start: .3f}/{duration: .3f} = {(end - start)/duration
|
| 161 |
"""
|
| 162 |
logging.info(info)
|
| 163 |
logging.info(f"hyp:\n{hyp}")
|
|
@@ -284,4 +286,4 @@ if __name__ == "__main__":
|
|
| 284 |
|
| 285 |
logging.basicConfig(format=formatter, level=logging.INFO)
|
| 286 |
|
| 287 |
-
demo.launch(
|
|
|
|
| 74 |
num_active_paths=num_active_paths,
|
| 75 |
)
|
| 76 |
except Exception as e:
|
| 77 |
+
logging.info(str(e))
|
| 78 |
return "", build_html_output(str(e), "result_item_error")
|
| 79 |
|
| 80 |
|
|
|
|
| 103 |
num_active_paths=num_active_paths,
|
| 104 |
)
|
| 105 |
except Exception as e:
|
| 106 |
+
logging.info(str(e))
|
| 107 |
return "", build_html_output(str(e), "result_item_error")
|
| 108 |
|
| 109 |
|
|
|
|
| 159 |
info = f"""
|
| 160 |
Wave duration : {duration: .3f} s <br/>
|
| 161 |
Processing time: {end - start: .3f} s <br/>
|
| 162 |
+
RTF: {end - start: .3f}/{duration: .3f} = {(end - start)/duration:.3f} <br/>
|
| 163 |
"""
|
| 164 |
logging.info(info)
|
| 165 |
logging.info(f"hyp:\n{hyp}")
|
|
|
|
| 286 |
|
| 287 |
logging.basicConfig(format=formatter, level=logging.INFO)
|
| 288 |
|
| 289 |
+
demo.launch()
|