Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -12,9 +12,11 @@ import numpy as np
|
|
12 |
def guessanImage(image):
|
13 |
model = "microsoft/resnet-50"
|
14 |
# st.write("using model:"+model)
|
|
|
15 |
imgclassifier = pipeline("image-classification", model=model)
|
16 |
if image is not None:
|
17 |
-
|
|
|
18 |
|
19 |
return description
|
20 |
|
|
|
12 |
def guessanImage(image):
|
13 |
model = "microsoft/resnet-50"
|
14 |
# st.write("using model:"+model)
|
15 |
+
|
16 |
imgclassifier = pipeline("image-classification", model=model)
|
17 |
if image is not None:
|
18 |
+
b64img = base64.b64encode(image.getvalue()).decode()
|
19 |
+
imgclassifier(b64img)
|
20 |
|
21 |
return description
|
22 |
|