Hu commited on
Commit
2175206
·
1 Parent(s): d701b84

change PIL load image

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -127,7 +127,8 @@ model.eval()
127
 
128
  def super_reso(image_path):
129
  # gradio open image as np array
130
- image = Image.fromarray(image_path, mode="RGB") # not needed, gradio already processes it
 
131
 
132
  # prediction
133
  with torch.no_grad():
 
127
 
128
  def super_reso(image_path):
129
  # gradio open image as np array
130
+ image_array = np.asarray(image_path)
131
+ image = Image.fromarray(image_array, mode="RGB")
132
 
133
  # prediction
134
  with torch.no_grad():