lixiang46 commited on
Commit
8947405
1 Parent(s): 8efa29e

add gr.error when post

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -40,8 +40,8 @@ def tryon(person_img, garment_img, seed, randomize_seed):
40
  if status == "success":
41
  uuid = result['result']
42
  print(uuid)
43
- except requests.exceptions.ReadTimeout:
44
- print("post timeout")
45
  raise gr.Error("Too many users, please try again later")
46
  post_end_time = time.time()
47
  print(f"post time used: {post_end_time-post_start_time}")
 
40
  if status == "success":
41
  uuid = result['result']
42
  print(uuid)
43
+ except Exception as err:
44
+ print(f"Error: {err}")
45
  raise gr.Error("Too many users, please try again later")
46
  post_end_time = time.time()
47
  print(f"post time used: {post_end_time-post_start_time}")