Fabrice-TIERCELIN commited on
Commit
ce2e330
1 Parent(s): 0dac2cb

if str(e) == "'No GPU is currently available for you after 60s'":

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -140,9 +140,9 @@ def stage2_process(*args, **kwargs):
140
  except Exception as e:
141
  # NO_GPU_MESSAGE_INQUEUE
142
  print("gradio.exceptions.Error: 'No GPU is currently available for you after 60s'")
143
- print('str(type(e)) ' + str(type(e)))
144
- print('str(e) ' + str(e))
145
- if str(type(e)) == "'No GPU is currently available for you after 60s'":
146
  print('Exception identified!!!')
147
  #if str(type(e)) == "<class 'gradio.exceptions.Error'>":
148
  #print('Exception of name ' + type(e).__name__)
 
140
  except Exception as e:
141
  # NO_GPU_MESSAGE_INQUEUE
142
  print("gradio.exceptions.Error: 'No GPU is currently available for you after 60s'")
143
+ print('str(type(e)) ' + str(type(e))) # <class 'gradio.exceptions.Error'>
144
+ print('str(e) ' + str(e)) # 'No GPU is currently available for you after 60s'
145
+ if str(e) == "'No GPU is currently available for you after 60s'":
146
  print('Exception identified!!!')
147
  #if str(type(e)) == "<class 'gradio.exceptions.Error'>":
148
  #print('Exception of name ' + type(e).__name__)