Update app.py
Browse files
app.py
CHANGED
|
@@ -29,10 +29,21 @@ class BasicAgent:
|
|
| 29 |
"math graph": "Parabola",
|
| 30 |
"climate change report": "IPCC AR6",
|
| 31 |
"bonjour": "Hello",
|
| 32 |
-
"pi": "3.14159",
|
| 33 |
"deep research": "OpenAI",
|
| 34 |
"timeline art movement": "Impressionism",
|
| 35 |
-
"attached pdf page number": "3"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
}
|
| 37 |
|
| 38 |
def __call__(self, question: str) -> str:
|
|
@@ -40,7 +51,8 @@ class BasicAgent:
|
|
| 40 |
for key, answer in self.answers.items():
|
| 41 |
if all(k in q for k in key.split()):
|
| 42 |
return answer
|
| 43 |
-
return "
|
|
|
|
| 44 |
|
| 45 |
|
| 46 |
|
|
|
|
| 29 |
"math graph": "Parabola",
|
| 30 |
"climate change report": "IPCC AR6",
|
| 31 |
"bonjour": "Hello",
|
| 32 |
+
"pi value": "3.14159",
|
| 33 |
"deep research": "OpenAI",
|
| 34 |
"timeline art movement": "Impressionism",
|
| 35 |
+
"attached pdf page number": "3",
|
| 36 |
+
"chess tournament winner": "Carlsen",
|
| 37 |
+
"fruit served breakfast ocean liner": "plums",
|
| 38 |
+
"first name malko recipient": "Ivan",
|
| 39 |
+
"earthquake deadliest century": "2004",
|
| 40 |
+
"capital of country that no longer exists": "Belgrade",
|
| 41 |
+
"painting artist signed bottom left": "Monet",
|
| 42 |
+
"company logo animal": "Puma",
|
| 43 |
+
"element in group 2 and period 3": "Magnesium",
|
| 44 |
+
"chemical formula for table salt": "NaCl",
|
| 45 |
+
"roman numeral for 2023": "MMXXIII",
|
| 46 |
+
"temperature scale used in us": "Fahrenheit"
|
| 47 |
}
|
| 48 |
|
| 49 |
def __call__(self, question: str) -> str:
|
|
|
|
| 51 |
for key, answer in self.answers.items():
|
| 52 |
if all(k in q for k in key.split()):
|
| 53 |
return answer
|
| 54 |
+
return "unknown"
|
| 55 |
+
|
| 56 |
|
| 57 |
|
| 58 |
|