Kamtera commited on
Commit
3715573
1 Parent(s): 71dc112

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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='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,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='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)
 
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)