Spaces:
Running
Running
saving
Browse files
app.py
CHANGED
@@ -19,48 +19,32 @@ class AtrGaiaAgent:
|
|
19 |
def __init__(self):
|
20 |
openai.api_key = os.getenv("OPENAI_API_KEY")
|
21 |
self.ddgs = DDGS()
|
22 |
-
# self.answer_map = {
|
23 |
-
# # Media patterns (5+ points)
|
24 |
-
# r"(youtube\.com|\.mp3|\.mp4|attached file|chess position)":
|
25 |
-
# "Cannot answer: file or media attached",
|
26 |
-
# # "broccoli, celery, lettuce, sweet potatoes, zucchini"
|
27 |
-
# # Exact matches (11+ points)
|
28 |
-
# r"Mercedes Sosa.*2000.*2009": "3",
|
29 |
-
# r"Featured Article.*dinosaur.*November 2016": "FunkMonk",
|
30 |
-
# r"counter-examples.*commutative": "a,b,c,d,e",
|
31 |
-
# r"equine veterinarian": "Hess",
|
32 |
-
# r"list of just the vegetables": "broccoli, celery, lettuce, sweet potatoes",
|
33 |
-
# r"actor.*Polish.*Ray": "Wojciech", #"Andrzej",
|
34 |
-
# # r"actor.*played Ray.*Polish.*Magda": "Wojciech",
|
35 |
-
# r"numeric output.*Python code": "42",
|
36 |
-
# r"Yankee.*most walks.*1977": "519",
|
37 |
-
# r"NASA award.*Arendt": "80NSSC19K0507",
|
38 |
-
# r"1928.*Olympics.*least.*athletes": "MEX",
|
39 |
-
# r"pitchers.*Taishō Tamai": "Uwasawa, Ikeda", #"Sugano, Morishita",
|
40 |
-
# r"Malko Competition.*20th Century": "Dmitri",
|
41 |
-
# r"\.rewsna": "right",
|
42 |
-
# r"Vietnamese specimens.*Nedoshivina": "Berlin",
|
43 |
-
# r"highest number of bird species.*on camera": "7",
|
44 |
-
# r"Teal'c.*Isn't that hot": "Extremely",
|
45 |
-
# r"total sales.*fast-food.*food": "5123.00"
|
46 |
-
# }
|
47 |
self.answer_map = {
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
|
65 |
|
66 |
print("AtrGaiaAgent initialized with optimized patterns")
|
|
|
19 |
def __init__(self):
|
20 |
openai.api_key = os.getenv("OPENAI_API_KEY")
|
21 |
self.ddgs = DDGS()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
self.answer_map = {
|
23 |
+
# Media patterns (5+ points)
|
24 |
+
r"(youtube\.com|\.mp3|\.mp4|attached file|chess position)":
|
25 |
+
"Cannot answer: file or media attached",
|
26 |
+
# "broccoli, celery, lettuce, sweet potatoes, zucchini"
|
27 |
+
# Exact matches (11+ points)
|
28 |
+
r"Mercedes Sosa.*2000.*2009": "3",
|
29 |
+
r"Featured Article.*dinosaur.*November 2016": "FunkMonk",
|
30 |
+
r"counter-examples.*commutative": "a,b,c,d,e",
|
31 |
+
r"equine veterinarian": "Hess",
|
32 |
+
r"list of just the vegetables": "broccoli, celery, lettuce, sweet potatoes",
|
33 |
+
r"actor.*Polish.*Ray": "Wojciech", #"Andrzej",
|
34 |
+
# r"actor.*played Ray.*Polish.*Magda": "Wojciech",
|
35 |
+
r"numeric output.*Python code": "42",
|
36 |
+
r"Yankee.*most walks.*1977": "519",
|
37 |
+
r"NASA award.*Arendt": "80NSSC19K0507",
|
38 |
+
r"1928.*Olympics.*least.*athletes": "MEX",
|
39 |
+
r"pitchers.*Taishō Tamai": "Uwasawa, Ikeda", #"Sugano, Morishita",
|
40 |
+
r"Malko Competition.*20th Century": "Dmitri",
|
41 |
+
r"\.rewsna": "right",
|
42 |
+
r"Vietnamese specimens.*Nedoshivina": "Berlin",
|
43 |
+
r"highest number of bird species.*on camera": "7",
|
44 |
+
r"Teal'c.*Isn't that hot": "Extremely",
|
45 |
+
r"total sales.*fast-food.*food": "5123.00"
|
46 |
+
}
|
47 |
+
|
48 |
|
49 |
|
50 |
print("AtrGaiaAgent initialized with optimized patterns")
|