dreamdrop-art commited on
Commit
90c9c61
1 Parent(s): 7e726ee

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -7,6 +7,7 @@ import os
7
  from io import BytesIO
8
  import io
9
  import html
 
10
  from PIL import Image
11
  import re
12
 
@@ -33,7 +34,7 @@ def hf_inference(prompt, negative, model, steps, sampler, guidance, width, heigh
33
  }, model=model)
34
  image = Image.open(io.BytesIO(image_bytes))
35
  return image
36
- expect PIL.UnidentifiedImageError:
37
  gr.Warning("This model is not loaded now. Try others models.")
38
 
39
 
 
7
  from io import BytesIO
8
  import io
9
  import html
10
+ import PIL
11
  from PIL import Image
12
  import re
13
 
 
34
  }, model=model)
35
  image = Image.open(io.BytesIO(image_bytes))
36
  return image
37
+ except PIL.UnidentifiedImageError:
38
  gr.Warning("This model is not loaded now. Try others models.")
39
 
40