Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -24,7 +24,7 @@ def find_similarity(base64_image, text_input):
|
|
24 |
image_bytes = base64.b64decode(base64_image)
|
25 |
|
26 |
# Convert the bytes to a numpy array
|
27 |
-
image = np.array(Image.open(BytesIO(image_bytes))
|
28 |
|
29 |
# Preprocess the image
|
30 |
image = preprocess(image).unsqueeze(0).to(device)
|
|
|
24 |
image_bytes = base64.b64decode(base64_image)
|
25 |
|
26 |
# Convert the bytes to a numpy array
|
27 |
+
image = np.array(Image.open(BytesIO(image_bytes)))
|
28 |
|
29 |
# Preprocess the image
|
30 |
image = preprocess(image).unsqueeze(0).to(device)
|