SamSwift commited on
Commit
acf1aea
·
1 Parent(s): 94c0b94

Update inference.py

Browse files
Files changed (1) hide show
  1. inference.py +6 -3
inference.py CHANGED
@@ -26,7 +26,8 @@ def query(filename, lang):
26
  else:
27
  print('No response yet')
28
  except KeyError as e:
29
- return 'Model is still loading..., please wait!'
 
30
 
31
  elif (lang == 'yo') and (filename is not None):
32
  API_URL = "https://api-inference.huggingface.co/models/Ayoola/cdial-yoruba-test"
@@ -43,7 +44,8 @@ def query(filename, lang):
43
  else:
44
  pass
45
  except KeyError as e:
46
- return 'Model is still loading..., please wait!'
 
47
 
48
  elif (lang == 'en') and (filename is not None):
49
  API_URL = "https://api-inference.huggingface.co/models/facebook/wav2vec2-base-960h"
@@ -59,6 +61,7 @@ def query(filename, lang):
59
  else:
60
  print('No response yet')
61
  except KeyError as e:
62
- return 'Model is still loading..., please wait!'
 
63
  else:
64
  pass
 
26
  else:
27
  print('No response yet')
28
  except KeyError as e:
29
+ pass
30
+ #return 'Model is still loading..., please wait!'
31
 
32
  elif (lang == 'yo') and (filename is not None):
33
  API_URL = "https://api-inference.huggingface.co/models/Ayoola/cdial-yoruba-test"
 
44
  else:
45
  pass
46
  except KeyError as e:
47
+ pass
48
+ #return 'Model is still loading..., please wait!'
49
 
50
  elif (lang == 'en') and (filename is not None):
51
  API_URL = "https://api-inference.huggingface.co/models/facebook/wav2vec2-base-960h"
 
61
  else:
62
  print('No response yet')
63
  except KeyError as e:
64
+ pass
65
+ #print('Model is still loading..., please wait!'
66
  else:
67
  pass