Abrahamau commited on
Commit
97b336a
·
verified ·
1 Parent(s): 18d5e82

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
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
- imgclassifier(image)
 
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