Fabrice-TIERCELIN commited on
Commit
f843efe
·
verified ·
1 Parent(s): fec9b28

gradio.exceptions.Error: 'No GPU is currently available for you after 60s'

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -139,7 +139,10 @@ def stage2_process(*args, **kwargs):
139
  return restore_in_Xmin(*args, **kwargs)
140
  except Exception as e:
141
  print('Exception of type ' + str(type(e)))
142
- if type(e).__name__ == "<class 'gradio.exceptions.Error'>":
 
 
 
143
  print('Exception of name ' + type(e).__name__)
144
  raise e
145
 
@@ -535,7 +538,7 @@ with gr.Blocks() as interface:
535
  prompt_hint = gr.HTML("You can use a <a href='"'https://huggingface.co/spaces/MaziyarPanahi/llava-llama-3-8b'"'>LlaVa space</a> to auto-generate the description of your image.")
536
  upscale = gr.Radio([["x1", 1], ["x2", 2], ["x3", 3], ["x4", 4], ["x5", 5], ["x6", 6], ["x7", 7], ["x8", 8], ["x9", 9], ["x10", 10]], label="Upscale factor", info="Resolution x1 to x10", value=2, interactive=True)
537
  output_format = gr.Radio([["As input", "input"], ["*.png", "png"], ["*.webp", "webp"], ["*.jpeg", "jpeg"], ["*.gif", "gif"], ["*.bmp", "bmp"]], label="Image format for result", info="File extention", value="input", interactive=True)
538
- allocation = gr.Radio([["1 min", 1], ["2 min", 2], ["3 min", 3], ["4 min", 4], ["5 min", 5], ["6 min", 6], ["7 min", 7], ["8 min (discouraged)", 8], ["9 min (discouraged)", 9], ["10 min (discouraged)", 10]], label="GPU allocation time", info="lower=May abort run, higher=Quota penalty for next runs", value=5, interactive=True)
539
 
540
  with gr.Accordion("Pre-denoising (optional)", open=False):
541
  gamma_correction = gr.Slider(label="Gamma Correction", info = "lower=lighter, higher=darker", minimum=0.1, maximum=2.0, value=1.0, step=0.1)
 
139
  return restore_in_Xmin(*args, **kwargs)
140
  except Exception as e:
141
  print('Exception of type ' + str(type(e)))
142
+ print("gradio.exceptions.Error: 'No GPU is currently available for you after 60s'")
143
+ print('Exception of message ' + str(e))
144
+ print(NO_GPU_MESSAGE_INQUEUE)
145
+ if str(type(e)) == "<class 'gradio.exceptions.Error'>":
146
  print('Exception of name ' + type(e).__name__)
147
  raise e
148
 
 
538
  prompt_hint = gr.HTML("You can use a <a href='"'https://huggingface.co/spaces/MaziyarPanahi/llava-llama-3-8b'"'>LlaVa space</a> to auto-generate the description of your image.")
539
  upscale = gr.Radio([["x1", 1], ["x2", 2], ["x3", 3], ["x4", 4], ["x5", 5], ["x6", 6], ["x7", 7], ["x8", 8], ["x9", 9], ["x10", 10]], label="Upscale factor", info="Resolution x1 to x10", value=2, interactive=True)
540
  output_format = gr.Radio([["As input", "input"], ["*.png", "png"], ["*.webp", "webp"], ["*.jpeg", "jpeg"], ["*.gif", "gif"], ["*.bmp", "bmp"]], label="Image format for result", info="File extention", value="input", interactive=True)
541
+ allocation = gr.Radio([["1 min", 1], ["2 min", 2], ["3 min", 3], ["4 min", 4], ["5 min", 5], ["6 min", 6], ["7 min (discouraged)", 7], ["8 min (discouraged)", 8], ["9 min (discouraged)", 9], ["10 min (discouraged)", 10]], label="GPU allocation time", info="lower=May abort run, higher=Quota penalty for next runs", value=5, interactive=True)
542
 
543
  with gr.Accordion("Pre-denoising (optional)", open=False):
544
  gamma_correction = gr.Slider(label="Gamma Correction", info = "lower=lighter, higher=darker", minimum=0.1, maximum=2.0, value=1.0, step=0.1)