serhii-korobchenko commited on
Commit
b70056b
·
verified ·
1 Parent(s): 02ac556

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -11
app.py CHANGED
@@ -28,17 +28,7 @@ model.eval()
28
 
29
  def predict(im):
30
 
31
- def list_shape(lst):
32
- if not isinstance(lst, list):
33
- return []
34
- if not lst:
35
- return [0]
36
- shapes = [list_shape(sublist) for sublist in lst]
37
- max_shape = max(shapes, key=len)
38
- return [len(lst)] + [max(dimensions[i] if i < len(dimensions) else 0 for dimensions in shapes) for i in range(len(max_shape))]
39
-
40
-
41
- print(list_shape(im))
42
 
43
 
44
  x = torch.tensor(im, dtype=torch.float32).unsqueeze(0).unsqueeze(0) / 255.
 
28
 
29
  def predict(im):
30
 
31
+ print(type(im))
 
 
 
 
 
 
 
 
 
 
32
 
33
 
34
  x = torch.tensor(im, dtype=torch.float32).unsqueeze(0).unsqueeze(0) / 255.