fmegahed commited on
Commit
c94c333
·
verified ·
1 Parent(s): b8d3576

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -28,9 +28,9 @@ if st.button("Classify Test Images"):
28
  else:
29
  st.info("Running classification...")
30
 
31
- nominal_imgs = [preprocess(Image.open(f).convert("RGB")).unsqueeze(0) for f in nominal_files]
32
- defective_imgs = [preprocess(Image.open(f).convert("RGB")).unsqueeze(0) for f in defective_files]
33
- test_imgs = [preprocess(Image.open(f).convert("RGB")).unsqueeze(0) for f in test_files]
34
 
35
  results = few_shot_fault_classification(
36
  model=model,
 
28
  else:
29
  st.info("Running classification...")
30
 
31
+ nominal_imgs = [preprocess(Image.open(f).convert("RGB")).unsqueeze(0).to(device) for f in nominal_files]
32
+ defective_imgs = [preprocess(Image.open(f).convert("RGB")).unsqueeze(0).to(device) for f in defective_files]
33
+ test_imgs = [preprocess(Image.open(f).convert("RGB")).unsqueeze(0).to(device) for f in test_files]
34
 
35
  results = few_shot_fault_classification(
36
  model=model,