wishmi1234 commited on
Commit
c61c96d
·
verified ·
1 Parent(s): da02d65

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -38,7 +38,11 @@ class ImageCaptioningTool(Tool):
38
  inputs = {"image": "image"}
39
  output_type = "text"
40
 
41
- def run(self, image: Image.Image) -> str:
 
 
 
 
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: