Srj-ai commited on
Commit
bb744be
·
verified ·
1 Parent(s): 21ccc6f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -18,15 +18,16 @@ final_answer = FinalAnswerTool()
18
  wikipedia_search= WikipediaSearchTool()
19
  python_code_executor=PythonInterpreterTool()
20
 
21
- image_captioner = pipeline(
22
- "image-to-text",
23
- model="Salesforce/blip-image-captioning-base"
24
- )
25
  @tool
26
  def describe_image(path):
27
  """Describes the image. requires image path. return image description.
28
  Args: path of image
29
  """
 
 
 
 
30
  return image_captioner(path)[0]["generated_text"]
31
 
32
  @tool
 
18
  wikipedia_search= WikipediaSearchTool()
19
  python_code_executor=PythonInterpreterTool()
20
 
21
+
 
 
 
22
  @tool
23
  def describe_image(path):
24
  """Describes the image. requires image path. return image description.
25
  Args: path of image
26
  """
27
+ image_captioner = pipeline(
28
+ "image-to-text",
29
+ model="Salesforce/blip-image-captioning-base"
30
+ )
31
  return image_captioner(path)[0]["generated_text"]
32
 
33
  @tool