niulx commited on
Commit
c1234b6
1 Parent(s): 6cf97e1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -257,7 +257,7 @@ with gr.Blocks() as demo:
257
  train_batch_size,
258
  gradient_accumulation_steps,
259
  ):
260
- try:
261
  run_optimization = partial(
262
  run_main,
263
  num_tokens=int(num_tokens),
@@ -271,8 +271,8 @@ with gr.Blocks() as demo:
271
  run_optimization()
272
  print('finish')
273
  return "Optimization finished!"
274
- except:
275
- return "CUDA out of memory, use a smaller batch size or try another picture."
276
 
277
 
278
  def immediate_update():
 
257
  train_batch_size,
258
  gradient_accumulation_steps,
259
  ):
260
+ if 1:
261
  run_optimization = partial(
262
  run_main,
263
  num_tokens=int(num_tokens),
 
271
  run_optimization()
272
  print('finish')
273
  return "Optimization finished!"
274
+ #except:
275
+ # return "CUDA out of memory, use a smaller batch size or try another picture."
276
 
277
 
278
  def immediate_update():