Spaces:
Running
Running
Update app.py
Browse files
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 =
|
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):
|