Onegafer commited on
Commit
0520162
·
1 Parent(s): 5832f97

Error verbosity

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -1,3 +1,4 @@
 
1
  import gradio, os
2
  from gradio_client import Client
3
  from dotenv import load_dotenv
@@ -27,6 +28,8 @@ def redirect(query, collection_name):
27
  )
28
  except Exception as e:
29
  print(f"Failed to get prediction: {e}")
 
 
30
  return "Failed to get prediction. Please try again."
31
 
32
  return result
 
1
+ import traceback
2
  import gradio, os
3
  from gradio_client import Client
4
  from dotenv import load_dotenv
 
28
  )
29
  except Exception as e:
30
  print(f"Failed to get prediction: {e}")
31
+ print(f"Exception type: {type(e)}")
32
+ print(traceback.format_exc())
33
  return "Failed to get prediction. Please try again."
34
 
35
  return result