bonosa commited on
Commit
3db40fb
Β·
1 Parent(s): cf699fd

work damn you!

Browse files
Files changed (1) hide show
  1. app.py +7 -0
app.py CHANGED
@@ -5,6 +5,13 @@ import gradio
5
  from gradio.inputs import *
6
  from gradio.outputs import *
7
  from gradio import Interface, File
 
 
 
 
 
 
 
8
 
9
  # 4. Create a Gradio interface
10
  def predict_parrot_species(image):
 
5
  from gradio.inputs import *
6
  from gradio.outputs import *
7
  from gradio import Interface, File
8
+ import traceback
9
+ import sys
10
+
11
+ def exception_handler(type, value, tb):
12
+ print("".join(traceback.format_exception(type, value, tb)))
13
+
14
+ sys.excepthook = exception_handler
15
 
16
  # 4. Create a Gradio interface
17
  def predict_parrot_species(image):