Spaces:
Sleeping
Sleeping
Commit
·
5ee1287
1
Parent(s):
a56bad0
updated app.py
Browse files- .gitignore +1 -0
- app.py +3 -3
- question_retriever.ipynb +29 -9
.gitignore
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
.env
|
app.py
CHANGED
|
@@ -20,9 +20,9 @@ class GAIAAgent:
|
|
| 20 |
CURRENT_DIR = os.path.dirname(os.path.abspath(__file__))
|
| 21 |
|
| 22 |
model = InferenceClientModel(
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
)
|
| 27 |
|
| 28 |
with open(os.path.join(CURRENT_DIR, "prompts.yaml"), 'r') as stream:
|
|
|
|
| 20 |
CURRENT_DIR = os.path.dirname(os.path.abspath(__file__))
|
| 21 |
|
| 22 |
model = InferenceClientModel(
|
| 23 |
+
model_id="anthropic/claude-3.5-sonnet-20241022",
|
| 24 |
+
provider="anthropic",
|
| 25 |
+
token=os.getenv("ANTHROPIC_API_KEY")
|
| 26 |
)
|
| 27 |
|
| 28 |
with open(os.path.join(CURRENT_DIR, "prompts.yaml"), 'r') as stream:
|
question_retriever.ipynb
CHANGED
|
@@ -101,7 +101,7 @@
|
|
| 101 |
},
|
| 102 |
{
|
| 103 |
"cell_type": "code",
|
| 104 |
-
"execution_count":
|
| 105 |
"metadata": {},
|
| 106 |
"outputs": [],
|
| 107 |
"source": [
|
|
@@ -110,7 +110,7 @@
|
|
| 110 |
},
|
| 111 |
{
|
| 112 |
"cell_type": "code",
|
| 113 |
-
"execution_count":
|
| 114 |
"metadata": {},
|
| 115 |
"outputs": [
|
| 116 |
{
|
|
@@ -217,7 +217,7 @@
|
|
| 217 |
"2.... "
|
| 218 |
]
|
| 219 |
},
|
| 220 |
-
"execution_count":
|
| 221 |
"metadata": {},
|
| 222 |
"output_type": "execute_result"
|
| 223 |
}
|
|
@@ -228,22 +228,42 @@
|
|
| 228 |
},
|
| 229 |
{
|
| 230 |
"cell_type": "code",
|
| 231 |
-
"execution_count":
|
| 232 |
"metadata": {},
|
| 233 |
"outputs": [
|
| 234 |
{
|
| 235 |
"data": {
|
| 236 |
"text/plain": [
|
| 237 |
-
"'
|
| 238 |
]
|
| 239 |
},
|
| 240 |
-
"execution_count":
|
| 241 |
"metadata": {},
|
| 242 |
"output_type": "execute_result"
|
| 243 |
}
|
| 244 |
],
|
| 245 |
"source": [
|
| 246 |
-
"df_level1.loc[
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 247 |
]
|
| 248 |
},
|
| 249 |
{
|
|
@@ -256,9 +276,9 @@
|
|
| 256 |
],
|
| 257 |
"metadata": {
|
| 258 |
"kernelspec": {
|
| 259 |
-
"display_name": "
|
| 260 |
"language": "python",
|
| 261 |
-
"name": "
|
| 262 |
},
|
| 263 |
"language_info": {
|
| 264 |
"codemirror_mode": {
|
|
|
|
| 101 |
},
|
| 102 |
{
|
| 103 |
"cell_type": "code",
|
| 104 |
+
"execution_count": 7,
|
| 105 |
"metadata": {},
|
| 106 |
"outputs": [],
|
| 107 |
"source": [
|
|
|
|
| 110 |
},
|
| 111 |
{
|
| 112 |
"cell_type": "code",
|
| 113 |
+
"execution_count": 8,
|
| 114 |
"metadata": {},
|
| 115 |
"outputs": [
|
| 116 |
{
|
|
|
|
| 217 |
"2.... "
|
| 218 |
]
|
| 219 |
},
|
| 220 |
+
"execution_count": 8,
|
| 221 |
"metadata": {},
|
| 222 |
"output_type": "execute_result"
|
| 223 |
}
|
|
|
|
| 228 |
},
|
| 229 |
{
|
| 230 |
"cell_type": "code",
|
| 231 |
+
"execution_count": 15,
|
| 232 |
"metadata": {},
|
| 233 |
"outputs": [
|
| 234 |
{
|
| 235 |
"data": {
|
| 236 |
"text/plain": [
|
| 237 |
+
"'What was the volume in m^3 of the fish bag that was calculated in the University of Leicester paper \"Can Hiccup Supply Enough Fish to Maintain a Dragon’s Diet?\"'"
|
| 238 |
]
|
| 239 |
},
|
| 240 |
+
"execution_count": 15,
|
| 241 |
"metadata": {},
|
| 242 |
"output_type": "execute_result"
|
| 243 |
}
|
| 244 |
],
|
| 245 |
"source": [
|
| 246 |
+
"df_level1.loc[3, 'Question']"
|
| 247 |
+
]
|
| 248 |
+
},
|
| 249 |
+
{
|
| 250 |
+
"cell_type": "code",
|
| 251 |
+
"execution_count": 14,
|
| 252 |
+
"metadata": {},
|
| 253 |
+
"outputs": [
|
| 254 |
+
{
|
| 255 |
+
"data": {
|
| 256 |
+
"text/plain": [
|
| 257 |
+
"'0.1777'"
|
| 258 |
+
]
|
| 259 |
+
},
|
| 260 |
+
"execution_count": 14,
|
| 261 |
+
"metadata": {},
|
| 262 |
+
"output_type": "execute_result"
|
| 263 |
+
}
|
| 264 |
+
],
|
| 265 |
+
"source": [
|
| 266 |
+
"df_level1.loc[3, 'Final answer']"
|
| 267 |
]
|
| 268 |
},
|
| 269 |
{
|
|
|
|
| 276 |
],
|
| 277 |
"metadata": {
|
| 278 |
"kernelspec": {
|
| 279 |
+
"display_name": "nlp_course",
|
| 280 |
"language": "python",
|
| 281 |
+
"name": "python3"
|
| 282 |
},
|
| 283 |
"language_info": {
|
| 284 |
"codemirror_mode": {
|