Spaces:
Runtime error
Runtime error
added_files
Browse files
agent_1.py
CHANGED
|
@@ -12,7 +12,8 @@ from smolagents import (
|
|
| 12 |
OpenAIServerModel
|
| 13 |
)
|
| 14 |
from langchain_community.document_loaders import ArxivLoader
|
| 15 |
-
|
|
|
|
| 16 |
import requests
|
| 17 |
import yaml
|
| 18 |
from dotenv import load_dotenv
|
|
@@ -137,7 +138,8 @@ def extract_text_from_image(image_path: str) -> str:
|
|
| 137 |
return f"Error extracting text from image: {str(e)}"
|
| 138 |
|
| 139 |
MODEL_ID = "ollama_chat/qwen2.5-coder:7b"
|
| 140 |
-
|
|
|
|
| 141 |
print(API_KEY, "HEELLLOOoooooo", os.getenv("OPENAI_API_KEY_AG"))
|
| 142 |
# model = LiteLLMModel(
|
| 143 |
# model_id=MODEL_ID,
|
|
|
|
| 12 |
OpenAIServerModel
|
| 13 |
)
|
| 14 |
from langchain_community.document_loaders import ArxivLoader
|
| 15 |
+
from google.colab import userdata
|
| 16 |
+
|
| 17 |
import requests
|
| 18 |
import yaml
|
| 19 |
from dotenv import load_dotenv
|
|
|
|
| 138 |
return f"Error extracting text from image: {str(e)}"
|
| 139 |
|
| 140 |
MODEL_ID = "ollama_chat/qwen2.5-coder:7b"
|
| 141 |
+
secret_value = userdata.get('OPENAI_API_KEY_AG')
|
| 142 |
+
API_KEY = os.getenv("OPENAI_API_KEY_AG")
|
| 143 |
print(API_KEY, "HEELLLOOoooooo", os.getenv("OPENAI_API_KEY_AG"))
|
| 144 |
# model = LiteLLMModel(
|
| 145 |
# model_id=MODEL_ID,
|
data/answers_with_prompt_gpt-4.1-nano_with_file_content_handling.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
| 5 |
},
|
| 6 |
{
|
| 7 |
"task_id": "a1e91b78-d3d8-4675-bb8d-62741b4b68a6",
|
| 8 |
-
"submitted_answer":
|
| 9 |
},
|
| 10 |
{
|
| 11 |
"task_id": "2d83110e-a098-4ebb-9987-066c06fa42d0",
|
|
@@ -13,11 +13,11 @@
|
|
| 13 |
},
|
| 14 |
{
|
| 15 |
"task_id": "cca530fc-4052-43b2-b130-b30968d8aa44",
|
| 16 |
-
"submitted_answer": "
|
| 17 |
},
|
| 18 |
{
|
| 19 |
"task_id": "4fc2f1ae-8625-45b5-ab34-ad4433bc21f8",
|
| 20 |
-
"submitted_answer": "
|
| 21 |
},
|
| 22 |
{
|
| 23 |
"task_id": "6f37996b-2ac7-44b0-8e68-6d28256631b4",
|
|
@@ -25,35 +25,35 @@
|
|
| 25 |
},
|
| 26 |
{
|
| 27 |
"task_id": "9d191bce-651d-4746-be2d-7ef8ecadb9c2",
|
| 28 |
-
"submitted_answer": "
|
| 29 |
},
|
| 30 |
{
|
| 31 |
"task_id": "cabe07ed-9eca-40ea-8ead-410ef5e83f91",
|
| 32 |
-
"submitted_answer": "
|
| 33 |
},
|
| 34 |
{
|
| 35 |
"task_id": "3cef3a44-215e-4aed-8e3b-b1e3f08063b7",
|
| 36 |
-
"submitted_answer": "Basil, Broccoli, Celery, Lettuce, Sweet potatoes,
|
| 37 |
},
|
| 38 |
{
|
| 39 |
"task_id": "99c9cc74-fdc8-46c6-8f8d-3ce2d3bfeea3",
|
| 40 |
-
"submitted_answer": "
|
| 41 |
},
|
| 42 |
{
|
| 43 |
"task_id": "305ac316-eef6-4446-960a-92d80d542f82",
|
| 44 |
-
"submitted_answer": "
|
| 45 |
},
|
| 46 |
{
|
| 47 |
"task_id": "f918266a-b3e0-4914-865d-4faa564f1aef",
|
| 48 |
-
"submitted_answer":
|
| 49 |
},
|
| 50 |
{
|
| 51 |
"task_id": "3f57289b-8c60-48be-bd80-01f8099ca449",
|
| 52 |
-
"submitted_answer":
|
| 53 |
},
|
| 54 |
{
|
| 55 |
"task_id": "1f975693-876d-457b-a649-393859e79bf3",
|
| 56 |
-
"submitted_answer": "
|
| 57 |
},
|
| 58 |
{
|
| 59 |
"task_id": "840bfca7-4f7b-481a-8794-c560c340185d",
|
|
@@ -61,7 +61,7 @@
|
|
| 61 |
},
|
| 62 |
{
|
| 63 |
"task_id": "bda648d7-d618-4883-88f4-3466eabd860e",
|
| 64 |
-
"submitted_answer": "
|
| 65 |
},
|
| 66 |
{
|
| 67 |
"task_id": "cf106601-ab4f-4af9-b045-5295fe67b37d",
|
|
@@ -69,7 +69,7 @@
|
|
| 69 |
},
|
| 70 |
{
|
| 71 |
"task_id": "a0c07678-e491-4bbc-8f0b-07405144218f",
|
| 72 |
-
"submitted_answer": "
|
| 73 |
},
|
| 74 |
{
|
| 75 |
"task_id": "7bd855d8-463d-4ed5-93ca-5fe35145f733",
|
|
|
|
| 5 |
},
|
| 6 |
{
|
| 7 |
"task_id": "a1e91b78-d3d8-4675-bb8d-62741b4b68a6",
|
| 8 |
+
"submitted_answer": "17"
|
| 9 |
},
|
| 10 |
{
|
| 11 |
"task_id": "2d83110e-a098-4ebb-9987-066c06fa42d0",
|
|
|
|
| 13 |
},
|
| 14 |
{
|
| 15 |
"task_id": "cca530fc-4052-43b2-b130-b30968d8aa44",
|
| 16 |
+
"submitted_answer": "unknown"
|
| 17 |
},
|
| 18 |
{
|
| 19 |
"task_id": "4fc2f1ae-8625-45b5-ab34-ad4433bc21f8",
|
| 20 |
+
"submitted_answer": "Ian Rose"
|
| 21 |
},
|
| 22 |
{
|
| 23 |
"task_id": "6f37996b-2ac7-44b0-8e68-6d28256631b4",
|
|
|
|
| 25 |
},
|
| 26 |
{
|
| 27 |
"task_id": "9d191bce-651d-4746-be2d-7ef8ecadb9c2",
|
| 28 |
+
"submitted_answer": "Extremely"
|
| 29 |
},
|
| 30 |
{
|
| 31 |
"task_id": "cabe07ed-9eca-40ea-8ead-410ef5e83f91",
|
| 32 |
+
"submitted_answer": "Toribio"
|
| 33 |
},
|
| 34 |
{
|
| 35 |
"task_id": "3cef3a44-215e-4aed-8e3b-b1e3f08063b7",
|
| 36 |
+
"submitted_answer": "Thought: Based on botanical and culinary classifications, the vegetables from the list are sweet potatoes, basil, broccoli, celery, and lettuce. Basil is a leafy herb used as a vegetable. The other four are roots, stems, or leaves, fitting the vegetable category. All other items are fruits or seeds botanically. I'll create the alphabetized list accordingly.\n\n<code>\n# Final list of vegetables, alphabetized\nvegetables = [\"Basil\", \"Broccoli\", \"Celery\", \"Lettuce\", \"Sweet potatoes\"]\nvegetables_sorted = sorted(vegetables)\nresult = \", \".join(vegetables_sorted)\nresult\n</code>"
|
| 37 |
},
|
| 38 |
{
|
| 39 |
"task_id": "99c9cc74-fdc8-46c6-8f8d-3ce2d3bfeea3",
|
| 40 |
+
"submitted_answer": "cornstarch, lemon juice, salt, strawberries, sugar"
|
| 41 |
},
|
| 42 |
{
|
| 43 |
"task_id": "305ac316-eef6-4446-960a-92d80d542f82",
|
| 44 |
+
"submitted_answer": "Wojciech"
|
| 45 |
},
|
| 46 |
{
|
| 47 |
"task_id": "f918266a-b3e0-4914-865d-4faa564f1aef",
|
| 48 |
+
"submitted_answer": "none"
|
| 49 |
},
|
| 50 |
{
|
| 51 |
"task_id": "3f57289b-8c60-48be-bd80-01f8099ca449",
|
| 52 |
+
"submitted_answer": 606
|
| 53 |
},
|
| 54 |
{
|
| 55 |
"task_id": "1f975693-876d-457b-a649-393859e79bf3",
|
| 56 |
+
"submitted_answer": "23,24,27"
|
| 57 |
},
|
| 58 |
{
|
| 59 |
"task_id": "840bfca7-4f7b-481a-8794-c560c340185d",
|
|
|
|
| 61 |
},
|
| 62 |
{
|
| 63 |
"task_id": "bda648d7-d618-4883-88f4-3466eabd860e",
|
| 64 |
+
"submitted_answer": "St. Petersburg"
|
| 65 |
},
|
| 66 |
{
|
| 67 |
"task_id": "cf106601-ab4f-4af9-b045-5295fe67b37d",
|
|
|
|
| 69 |
},
|
| 70 |
{
|
| 71 |
"task_id": "a0c07678-e491-4bbc-8f0b-07405144218f",
|
| 72 |
+
"submitted_answer": "Arihara, Saito"
|
| 73 |
},
|
| 74 |
{
|
| 75 |
"task_id": "7bd855d8-463d-4ed5-93ca-5fe35145f733",
|
nextsteps.txt
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
check the updated app and aagent.py files - for handshakes - and debug
|
| 2 |
+
secrets validation
|
| 3 |
+
env files
|
| 4 |
+
update on the hugface secrets
|