Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -42,7 +42,7 @@ def load_file_to_data(file,sampling_rate=16_000):
|
|
42 |
|
43 |
|
44 |
def predict(data):
|
45 |
-
data=load_file_to_data(data,sampling_rate=
|
46 |
features = processor(data["speech"], sampling_rate=data["sampling_rate"], padding=True, return_tensors="pt")
|
47 |
input_values = features.input_values.to(device)
|
48 |
attention_mask = features.attention_mask.to(device)
|
@@ -60,7 +60,7 @@ def predict(data):
|
|
60 |
return decoded_results
|
61 |
|
62 |
def predict_lang_specific(data,lang_code):
|
63 |
-
data=load_file_to_data(data,sampling_rate=
|
64 |
features = processor(data["speech"], sampling_rate=data["sampling_rate"], padding=True, return_tensors="pt")
|
65 |
input_values = features.input_values.to(device)
|
66 |
attention_mask = features.attention_mask.to(device)
|
|
|
42 |
|
43 |
|
44 |
def predict(data):
|
45 |
+
data=load_file_to_data(data,sampling_rate=16_000)
|
46 |
features = processor(data["speech"], sampling_rate=data["sampling_rate"], padding=True, return_tensors="pt")
|
47 |
input_values = features.input_values.to(device)
|
48 |
attention_mask = features.attention_mask.to(device)
|
|
|
60 |
return decoded_results
|
61 |
|
62 |
def predict_lang_specific(data,lang_code):
|
63 |
+
data=load_file_to_data(data,sampling_rate=16_000)
|
64 |
features = processor(data["speech"], sampling_rate=data["sampling_rate"], padding=True, return_tensors="pt")
|
65 |
input_values = features.input_values.to(device)
|
66 |
attention_mask = features.attention_mask.to(device)
|