dvieri commited on
Commit
08b8cf8
·
verified ·
1 Parent(s): fd94fd8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -1,4 +1,5 @@
1
  import cv2
 
2
  import streamlit as st
3
  import tempfile
4
  import torch
@@ -54,7 +55,7 @@ def preprocess_image_siamese(img):
54
  transforms.Resize((224, 224)),
55
  transforms.ToTensor()
56
  ])
57
- img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
58
  return transform(img)
59
 
60
  def preprocess_image_svm(img):
 
1
  import cv2
2
+ from PIL import Image
3
  import streamlit as st
4
  import tempfile
5
  import torch
 
55
  transforms.Resize((224, 224)),
56
  transforms.ToTensor()
57
  ])
58
+ img = Image.open(file_path).convert("RGB")
59
  return transform(img)
60
 
61
  def preprocess_image_svm(img):