Spaces:
Configuration error
Configuration error
oremaz
commited on
Commit
·
bb1f1b4
1
Parent(s):
5ed2a08
Update agent.py
Browse files
agent.py
CHANGED
|
@@ -941,7 +941,7 @@ If you are asked for a comma separated list, apply the above rules depending of
|
|
| 941 |
}
|
| 942 |
|
| 943 |
async def main():
|
| 944 |
-
|
| 945 |
|
| 946 |
question_data = {
|
| 947 |
"Question": "How many studio albums were published by Mercedes Sosa between 2000 and 2009 (included)? List them !",
|
|
@@ -950,31 +950,9 @@ async def main():
|
|
| 950 |
|
| 951 |
print(question_data)
|
| 952 |
|
| 953 |
-
|
| 954 |
-
|
| 955 |
-
|
| 956 |
-
# Test proj_llm (multimodal LLM)
|
| 957 |
-
response = proj_llm.complete(
|
| 958 |
-
prompt="Describe what you see in this image.",
|
| 959 |
-
image_paths=[file_path]
|
| 960 |
-
)
|
| 961 |
-
print(f"LLM Response: {response.text}")
|
| 962 |
-
|
| 963 |
-
# Test embed_model with image
|
| 964 |
-
image_embedding = embed_model._get_text_embedding("", image_path=file_path)
|
| 965 |
-
print(f"Image embedding dimension: {len(image_embedding)}")
|
| 966 |
-
print(f"First 5 elements: {image_embedding[:5]}")
|
| 967 |
-
|
| 968 |
-
# Test embed_model with text
|
| 969 |
-
text_embedding = embed_model._get_text_embedding("A red sports car")
|
| 970 |
-
print(f"Text embedding dimension: {len(text_embedding)}")
|
| 971 |
-
|
| 972 |
-
# Test multimodal embedding (text + image)
|
| 973 |
-
multimodal_embedding = embed_model._get_query_embedding("red car", image_path=file_path)
|
| 974 |
-
print(f"Multimodal embedding dimension: {len(multimodal_embedding)}")
|
| 975 |
-
|
| 976 |
-
#answer = await agent.solve_gaia_question(question_data)
|
| 977 |
-
#print(f"Answer: {answer}")
|
| 978 |
|
| 979 |
if __name__ == '__main__':
|
| 980 |
asyncio.run(main())
|
|
|
|
| 941 |
}
|
| 942 |
|
| 943 |
async def main():
|
| 944 |
+
agent = EnhancedGAIAAgent()
|
| 945 |
|
| 946 |
question_data = {
|
| 947 |
"Question": "How many studio albums were published by Mercedes Sosa between 2000 and 2009 (included)? List them !",
|
|
|
|
| 950 |
|
| 951 |
print(question_data)
|
| 952 |
|
| 953 |
+
|
| 954 |
+
answer = await agent.solve_gaia_question(question_data)
|
| 955 |
+
print(f"Answer: {answer}")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 956 |
|
| 957 |
if __name__ == '__main__':
|
| 958 |
asyncio.run(main())
|