Max Brodeur-Urbas commited on
Commit
bbb40b3
·
1 Parent(s): 2df8faf

prediction count fix

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -41,11 +41,11 @@ def predict(audio_file_path):
41
  print(len(input_data))
42
 
43
  if(len(input_data) == 88108 or len(input_data) == 94252):
44
- failed_prediction_count = failed_prediction_count + 1
45
  output = "It appears your recording device isn't supported by Hugging Face/Gradio yet (iOS and macOS are causing issues). Windows and android record properly, sorry for the temporary inconvenience!"
46
  return output, {}, ""
47
  else:
48
- prediction_count = prediction_count + 1
49
 
50
  print("Prediction count: " + str(prediction_count))
51
  print("Failed prediction count: " + str(failed_prediction_count))
 
41
  print(len(input_data))
42
 
43
  if(len(input_data) == 88108 or len(input_data) == 94252):
44
+ failed_prediction_count += 1
45
  output = "It appears your recording device isn't supported by Hugging Face/Gradio yet (iOS and macOS are causing issues). Windows and android record properly, sorry for the temporary inconvenience!"
46
  return output, {}, ""
47
  else:
48
+ prediction_count += 1
49
 
50
  print("Prediction count: " + str(prediction_count))
51
  print("Failed prediction count: " + str(failed_prediction_count))