JLW commited on
Commit
f430fef
·
1 Parent(s): 20672d3

Temporarily remove Whisper functionality

Browse files
Files changed (1) hide show
  1. app.py +6 -8
app.py CHANGED
@@ -263,17 +263,15 @@ def run_chain(chain, inp, capture_hidden_text):
263
  try:
264
  output = chain.run(input=inp)
265
  except AuthenticationError as ae:
266
- output = AUTH_ERR_MSG
267
- print("\nAuthenticationError: ", ae)
 
268
  except ValueError as ve:
269
- output = "ValueError, " + str(ve)
270
- print("\nValueError: ", ve)
271
  except InvalidRequestError as ire:
272
- output = BUG_FOUND_MSG + " Here are the details: InvalidRequestError, " + str(ire)
273
- print("\nInvalidRequestError: ", ire)
274
  except Exception as e:
275
- output = BUG_FOUND_MSG + " Here are the details: Exception, " + str(e)
276
- print("\nException: ", e)
277
 
278
  return output, hidden_text
279
 
 
263
  try:
264
  output = chain.run(input=inp)
265
  except AuthenticationError as ae:
266
+ error_msg = AUTH_ERR_MSG
267
+ except RateLimitError as rle:
268
+ error_msg = "\n\nRateLimitError."
269
  except ValueError as ve:
270
+ error_msg = "\n\nValueError."
 
271
  except InvalidRequestError as ire:
272
+ error_msg = "\n\nInvalidRequestError."
 
273
  except Exception as e:
274
+ error_msg = "\n\nException."
 
275
 
276
  return output, hidden_text
277