Spaces:
Sleeping
Sleeping
View GAIA Val Cases
Browse files- metadata.jsonl +0 -0
- requirements.txt +14 -1
- view_GAIA.py +38 -0
metadata.jsonl
ADDED
The diff for this file is too large to render.
See raw diff
|
|
requirements.txt
CHANGED
@@ -1,2 +1,15 @@
|
|
1 |
gradio
|
2 |
-
requests
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
gradio
|
2 |
+
requests
|
3 |
+
langchain
|
4 |
+
langchain-community
|
5 |
+
langchain-core
|
6 |
+
langchain-google-genai
|
7 |
+
langchain-huggingface
|
8 |
+
langchain-groq
|
9 |
+
langchain-tavily
|
10 |
+
langchain-chroma
|
11 |
+
langgraph
|
12 |
+
huggingface_hub
|
13 |
+
arxiv
|
14 |
+
pymupdf
|
15 |
+
wikipedia
|
view_GAIA.py
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import json
|
2 |
+
import random
|
3 |
+
import argparse
|
4 |
+
|
5 |
+
def main(nums=1):
|
6 |
+
with open('metadata.jsonl', 'r') as jsonl_file:
|
7 |
+
json_list = list(jsonl_file)
|
8 |
+
|
9 |
+
json_QA = []
|
10 |
+
for json_str in json_list:
|
11 |
+
json_data = json.loads(json_str)
|
12 |
+
json_QA.append(json_data)
|
13 |
+
|
14 |
+
random_samples = random.sample(json_QA, nums)
|
15 |
+
for sample in random_samples:
|
16 |
+
print("=" * 50)
|
17 |
+
print(f"Task ID: {sample['task_id']}")
|
18 |
+
print(f"Question: {sample['Question']}")
|
19 |
+
print(f"Level: {sample['Level']}")
|
20 |
+
print(f"Final Answer: {sample['Final answer']}")
|
21 |
+
print(f"Annotator Metadata: ")
|
22 |
+
print(f" βββ Steps: ")
|
23 |
+
for step in sample['Annotator Metadata']['Steps'].split('\n'):
|
24 |
+
print(f" β βββ {step}")
|
25 |
+
print(f" βββ Number of steps: {sample['Annotator Metadata']['Number of steps']}")
|
26 |
+
print(f" βββ How long did this take?: {sample['Annotator Metadata']['How long did this take?']}")
|
27 |
+
print(f" βββ Tools:")
|
28 |
+
for tool in sample['Annotator Metadata']['Tools'].split('\n'):
|
29 |
+
print(f" β βββ {tool}")
|
30 |
+
print(f" βββ Number of tools: {sample['Annotator Metadata']['Number of tools']}")
|
31 |
+
print("=" * 50)
|
32 |
+
|
33 |
+
if __name__=='__main__':
|
34 |
+
parser = argparse.ArgumentParser(description="number of GAIA examples")
|
35 |
+
parser.add_argument('--nums', type=int, required=True,
|
36 |
+
help="number of GAIA examples")
|
37 |
+
args = parser.parse_args()
|
38 |
+
main(nums=args.nums)
|