Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -241,6 +241,19 @@ class BasicAgent:
|
|
| 241 |
|
| 242 |
return min(0.99, max(0.1, confidence))
|
| 243 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 244 |
|
| 245 |
def run_and_submit_all( profile: gr.OAuthProfile | None):
|
| 246 |
"""
|
|
|
|
| 241 |
|
| 242 |
return min(0.99, max(0.1, confidence))
|
| 243 |
|
| 244 |
+
if __name__ == "__main__":
|
| 245 |
+
agent = BasicAgent()
|
| 246 |
+
|
| 247 |
+
questions = [
|
| 248 |
+
"How many studio albums did Taylor Swift release between 2010 and 2015?",
|
| 249 |
+
"When was the first iPhone released?",
|
| 250 |
+
"What is the capital of Canada?",
|
| 251 |
+
"List the planets in our solar system"
|
| 252 |
+
]
|
| 253 |
+
|
| 254 |
+
for question in questions:
|
| 255 |
+
result = agent.answer_question(question)
|
| 256 |
+
print(f"\nAnswer: {result['answer']}")
|
| 257 |
|
| 258 |
def run_and_submit_all( profile: gr.OAuthProfile | None):
|
| 259 |
"""
|