Rachel0619 commited on
Commit
5ee1287
·
1 Parent(s): a56bad0

updated app.py

Browse files
Files changed (3) hide show
  1. .gitignore +1 -0
  2. app.py +3 -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
- model_id="Qwen/Qwen2.5-Coder-32B-Instruct",
24
- provider="together",
25
- token=os.getenv("HF_TOKEN")
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": 11,
105
  "metadata": {},
106
  "outputs": [],
107
  "source": [
@@ -110,7 +110,7 @@
110
  },
111
  {
112
  "cell_type": "code",
113
- "execution_count": 12,
114
  "metadata": {},
115
  "outputs": [
116
  {
@@ -217,7 +217,7 @@
217
  "2.... "
218
  ]
219
  },
220
- "execution_count": 12,
221
  "metadata": {},
222
  "output_type": "execute_result"
223
  }
@@ -228,22 +228,42 @@
228
  },
229
  {
230
  "cell_type": "code",
231
- "execution_count": 18,
232
  "metadata": {},
233
  "outputs": [
234
  {
235
  "data": {
236
  "text/plain": [
237
- "'If Eliud Kipchoge could maintain his record-making marathon pace indefinitely, how many thousand hours would it take him to run the distance between the Earth and the Moon its closest approach? Please use the minimum perigee value on the Wikipedia page for the Moon when carrying out your calculation. Round your result to the nearest 1000 hours and do not use any comma separators if necessary.'"
238
  ]
239
  },
240
- "execution_count": 18,
241
  "metadata": {},
242
  "output_type": "execute_result"
243
  }
244
  ],
245
  "source": [
246
- "df_level1.loc[0, 'Question']"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
247
  ]
248
  },
249
  {
@@ -256,9 +276,9 @@
256
  ],
257
  "metadata": {
258
  "kernelspec": {
259
- "display_name": "gaia_env",
260
  "language": "python",
261
- "name": "gaia_env"
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": {