Spaces:
Sleeping
Sleeping
Update agent.py
Browse files
agent.py
CHANGED
|
@@ -7,7 +7,7 @@ import joblib
|
|
| 7 |
from openai import OpenAI
|
| 8 |
|
| 9 |
@tool
|
| 10 |
-
def download_and_get_path_for_provided_file(path: str):
|
| 11 |
"""
|
| 12 |
Download and cache the provided file. Returns the path of the cached file.
|
| 13 |
|
|
@@ -71,7 +71,7 @@ def extract_text_from_audio(file_path: str) -> str:
|
|
| 71 |
joblib.dump(transcription, f"cahced_files/{file_path}")
|
| 72 |
return transcription
|
| 73 |
|
| 74 |
-
|
| 75 |
def describe_image(request:str, file_path: str) -> str:
|
| 76 |
"""
|
| 77 |
Extract and return the requested information from an image given its path.
|
|
|
|
| 7 |
from openai import OpenAI
|
| 8 |
|
| 9 |
@tool
|
| 10 |
+
def download_and_get_path_for_provided_file(path: str) -> str:
|
| 11 |
"""
|
| 12 |
Download and cache the provided file. Returns the path of the cached file.
|
| 13 |
|
|
|
|
| 71 |
joblib.dump(transcription, f"cahced_files/{file_path}")
|
| 72 |
return transcription
|
| 73 |
|
| 74 |
+
@tool
|
| 75 |
def describe_image(request:str, file_path: str) -> str:
|
| 76 |
"""
|
| 77 |
Extract and return the requested information from an image given its path.
|