Spaces:
Runtime error
Runtime error
Commit
•
2fe97c0
1
Parent(s):
8b5991f
updated paths
Browse files
app.py
CHANGED
@@ -17,7 +17,7 @@ def get_model():
|
|
17 |
|
18 |
if not os.path.exists("./hi_am_model"):
|
19 |
print("Downloading Hindi AM")
|
20 |
-
download = subprocess.run(["wget","-P","
|
21 |
|
22 |
if download.returncode != 0:
|
23 |
raise Exception(f"Hindi Model Download Failed: {download.stderr}")
|
@@ -27,7 +27,7 @@ def get_model():
|
|
27 |
|
28 |
if not os.path.exists("./en_am_model"):
|
29 |
print("Downloading English AM")
|
30 |
-
download = subprocess.run(["wget","-P","
|
31 |
|
32 |
if download.returncode != 0:
|
33 |
raise Exception(f"English Model Download Failed: {download.stderr}")
|
@@ -36,8 +36,8 @@ def get_model():
|
|
36 |
print('Downloaded English AM')
|
37 |
|
38 |
try:
|
39 |
-
en_asr_model = nemo_asr.models.EncDecCTCModelBPE.restore_from("./en_am_model/")# /home/tanmay/zb/en_Conformer-CTC-BPE-Large.nemo
|
40 |
-
hi_asr_model = nemo_asr.models.EncDecCTCModelBPE.restore_from("./hi_am_model/") #/home/tanmay/zb/hi_Conformer-CTC-BPE-Large.nemo
|
41 |
except Exception as e:
|
42 |
print("ERROR Loading Model... ",e)
|
43 |
exit (1)
|
|
|
17 |
|
18 |
if not os.path.exists("./hi_am_model"):
|
19 |
print("Downloading Hindi AM")
|
20 |
+
download = subprocess.run(["wget","-P","./hi_am_model","https://storage.googleapis.com/vakyansh-open-models/conformer_models/hindi/filtered_v1_ssl_2022-07-08_19-43-25/Conformer-CTC-BPE-Large.nemo"],capture_output=True, text=True)
|
21 |
|
22 |
if download.returncode != 0:
|
23 |
raise Exception(f"Hindi Model Download Failed: {download.stderr}")
|
|
|
27 |
|
28 |
if not os.path.exists("./en_am_model"):
|
29 |
print("Downloading English AM")
|
30 |
+
download = subprocess.run(["wget","-P","./en_am_model","https://storage.googleapis.com/vakyansh-open-models/conformer_models/english/2022-09-13_15-50-48/Conformer-CTC-BPE-Large.nemo"],capture_output=True, text=True)
|
31 |
|
32 |
if download.returncode != 0:
|
33 |
raise Exception(f"English Model Download Failed: {download.stderr}")
|
|
|
36 |
print('Downloaded English AM')
|
37 |
|
38 |
try:
|
39 |
+
en_asr_model = nemo_asr.models.EncDecCTCModelBPE.restore_from("./en_am_model/Conformer-CTC-BPE-Large.nemo")# /home/tanmay/zb/en_Conformer-CTC-BPE-Large.nemo
|
40 |
+
hi_asr_model = nemo_asr.models.EncDecCTCModelBPE.restore_from("./hi_am_model/Conformer-CTC-BPE-Large.nemo") #/home/tanmay/zb/hi_Conformer-CTC-BPE-Large.nemo
|
41 |
except Exception as e:
|
42 |
print("ERROR Loading Model... ",e)
|
43 |
exit (1)
|