dron3flyv3r commited on
Commit
68e0ae6
·
1 Parent(s): 296a3ff

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -7,7 +7,7 @@ from read import classify
7
  st.title("Pizza & Not Pizza")
8
 
9
  device = torch.device("cpu")
10
- checkpoint = torch.load(r"best.pth.tar", map_location=device)
11
 
12
  model = checkpoint['model']
13
  classes = checkpoint['classes']
@@ -27,4 +27,7 @@ elif taking_picture is not None:
27
  img = Image.open(taking_picture)
28
  st.image(img, caption='Uploaded Image.', use_column_width=True)
29
  label = classify(model, img, tran, classes, device)
30
- st.write(label)
 
 
 
 
7
  st.title("Pizza & Not Pizza")
8
 
9
  device = torch.device("cpu")
10
+ checkpoint = torch.load(r"./best.pth.tar")
11
 
12
  model = checkpoint['model']
13
  classes = checkpoint['classes']
 
27
  img = Image.open(taking_picture)
28
  st.image(img, caption='Uploaded Image.', use_column_width=True)
29
  label = classify(model, img, tran, classes, device)
30
+ st.write(label)
31
+
32
+ else:
33
+ pass