Akjava commited on
Commit
d864493
1 Parent(s): 13500a1

change to numpy

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -4,6 +4,7 @@ import re
4
  from PIL import Image
5
  import flux1_inpaint
6
  import os
 
7
 
8
  def sanitize_prompt(prompt):
9
  # Allow only alphanumeric characters, spaces, and basic punctuation
@@ -49,7 +50,8 @@ def example_out(image,image_mask,prompt,strength,example_id):
49
  #base,ext = os.path.splitext(file)
50
  #key = base.split("_")[0]
51
 
52
- return Image.open(f"images/{example_id}.jpg")
 
53
 
54
  css="""
55
  #col-left {
 
4
  from PIL import Image
5
  import flux1_inpaint
6
  import os
7
+ import numpy as np
8
 
9
  def sanitize_prompt(prompt):
10
  # Allow only alphanumeric characters, spaces, and basic punctuation
 
50
  #base,ext = os.path.splitext(file)
51
  #key = base.split("_")[0]
52
 
53
+ loaded_image = Image.open(f"images/{example_id}.jpg")
54
+ return np.array(loaded_image)
55
 
56
  css="""
57
  #col-left {