Update app.py
Browse files
app.py
CHANGED
|
@@ -48,7 +48,7 @@ from io import BytesIO
|
|
| 48 |
from smolagents import Tool
|
| 49 |
|
| 50 |
class ImageCaptioningTool(Tool):
|
| 51 |
-
name = "
|
| 52 |
description = "Generates a caption for an input image."
|
| 53 |
inputs = {
|
| 54 |
"image": {"type": "image", "description": "Input image"},
|
|
@@ -71,7 +71,7 @@ class ImageCaptioningTool(Tool):
|
|
| 71 |
return result[0]["generated_text"] if result else "No caption generated"
|
| 72 |
|
| 73 |
image_captioner = ImageCaptioningTool(
|
| 74 |
-
name="
|
| 75 |
description="Generates a caption for an input image."
|
| 76 |
)
|
| 77 |
|
|
|
|
| 48 |
from smolagents import Tool
|
| 49 |
|
| 50 |
class ImageCaptioningTool(Tool):
|
| 51 |
+
name = "image_captioning"
|
| 52 |
description = "Generates a caption for an input image."
|
| 53 |
inputs = {
|
| 54 |
"image": {"type": "image", "description": "Input image"},
|
|
|
|
| 71 |
return result[0]["generated_text"] if result else "No caption generated"
|
| 72 |
|
| 73 |
image_captioner = ImageCaptioningTool(
|
| 74 |
+
name="image_captioning",
|
| 75 |
description="Generates a caption for an input image."
|
| 76 |
)
|
| 77 |
|