Update app.py
Browse files
app.py
CHANGED
|
@@ -38,7 +38,11 @@ class ImageCaptioningTool(Tool):
|
|
| 38 |
inputs = {"image": "image"}
|
| 39 |
output_type = "text"
|
| 40 |
|
| 41 |
-
def run(self,
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
return "This is a placeholder caption for the uploaded image."
|
| 43 |
|
| 44 |
class BasicAgent:
|
|
|
|
| 38 |
inputs = {"image": "image"}
|
| 39 |
output_type = "text"
|
| 40 |
|
| 41 |
+
def run(self, inputs: dict) -> str:
|
| 42 |
+
image = inputs.get("image")
|
| 43 |
+
if not image:
|
| 44 |
+
return "No image provided."
|
| 45 |
+
# You could run your model here instead
|
| 46 |
return "This is a placeholder caption for the uploaded image."
|
| 47 |
|
| 48 |
class BasicAgent:
|