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