Abrahamau commited on
Commit
0c13c68
·
verified ·
1 Parent(s): 97b336a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -15,14 +15,14 @@ def guessanImage(image):
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
 
23
  demo = gr.Interface(
24
  fn=guessanImage,
25
- inputs=[gr.Image()],
26
  outputs=["text"],
27
  )
28
 
 
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
 
23
  demo = gr.Interface(
24
  fn=guessanImage,
25
+ inputs=[gr.Image(type="pil")],
26
  outputs=["text"],
27
  )
28