yizhangliu commited on
Commit
3ae9189
1 Parent(s): 19586cf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -9
app.py CHANGED
@@ -220,15 +220,15 @@ def read_content(file_path: str) -> str:
220
  return content
221
 
222
  def predict(dict):
223
- print(f'liuyz_0_', dict)
224
- '''
225
- init_image = dict["image"] # .convert("RGB") #.resize((512, 512))
226
- target_size = (init_image.shape[0], init_image.shape[1])
227
- print(f'liuyz_1_', init_image, target_size)
228
- print(f'liuyz_2_', init_image.convert("RGB").shape)
229
- print(f'liuyz_3_', init_image.convert("RGB").resize((512, 512)).shape)
230
- mask = dict["mask"] # .convert("RGB") #.resize((512, 512))
231
- '''
232
  image = Image.fromarray(dict["image"])
233
  mask = Image.fromarray(dict["mask"])
234
  output = model_process(dict["image"], dict["mask"])
 
220
  return content
221
 
222
  def predict(dict):
223
+ # print(f'liuyz_0_', dict)
224
+
225
+ image = dict["image"] # .convert("RGB") #.resize((512, 512))
226
+ # target_size = (init_image.shape[0], init_image.shape[1])
227
+ print(f'liuyz_1_', image.shpe)
228
+ print(f'liuyz_2_', image.convert("RGB").shape)
229
+ print(f'liuyz_3_', image.convert("RGB").resize((512, 512)).shape)
230
+ # mask = dict["mask"] # .convert("RGB") #.resize((512, 512))
231
+
232
  image = Image.fromarray(dict["image"])
233
  mask = Image.fromarray(dict["mask"])
234
  output = model_process(dict["image"], dict["mask"])