Update app.py
Browse files
app.py
CHANGED
|
@@ -36,7 +36,7 @@ Your output must be: a single clean answer string only.
|
|
| 36 |
|
| 37 |
DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
|
| 38 |
|
| 39 |
-
from smolagents.
|
| 40 |
|
| 41 |
class ImageCaptioningTool(Tool):
|
| 42 |
name = "image_captioner"
|
|
@@ -58,9 +58,9 @@ class ImageCaptioningTool(Tool):
|
|
| 58 |
def run(self, inputs: dict) -> str:
|
| 59 |
image = inputs["image"]
|
| 60 |
question = inputs["question"]
|
| 61 |
-
#
|
| 62 |
return f"Captioning image for: {question}"
|
| 63 |
-
|
| 64 |
# class ImageCaptioningTool(Tool):
|
| 65 |
# name = "image_captioner"
|
| 66 |
# description = "Generate a caption for an image."
|
|
|
|
| 36 |
|
| 37 |
DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
|
| 38 |
|
| 39 |
+
from smolagents.tools import Tool
|
| 40 |
|
| 41 |
class ImageCaptioningTool(Tool):
|
| 42 |
name = "image_captioner"
|
|
|
|
| 58 |
def run(self, inputs: dict) -> str:
|
| 59 |
image = inputs["image"]
|
| 60 |
question = inputs["question"]
|
| 61 |
+
# Just a dummy return
|
| 62 |
return f"Captioning image for: {question}"
|
| 63 |
+
|
| 64 |
# class ImageCaptioningTool(Tool):
|
| 65 |
# name = "image_captioner"
|
| 66 |
# description = "Generate a caption for an image."
|