SusiePHaltmann commited on
Commit
da1349b
·
1 Parent(s): fcbbcdf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -95,8 +95,9 @@ def main():
95
  resize_factor = 512 / max_dim
96
 
97
  width, height = int(width * resize_factor), int(height * resize_factor)
98
-
99
- image = np.array(Image.open(image).resize((width, height))) else:
100
- image = np.array(Image.open(image))
 
101
 
102
  # Inpaint!
 
95
  resize_factor = 512 / max_dim
96
 
97
  width, height = int(width * resize_factor), int(height * resize_factor)
98
+ @st.cache
99
+ def load_image(image):
100
+ image = np.array(Image.open(image))
101
+ return image
102
 
103
  # Inpaint!