From dd95f4215df0790d42b45e4c3d5d6feea4807a00 Mon Sep 17 00:00:00 2001 From: Hoang Viet Khoa Date: Thu, 28 Sep 2023 05:32:04 +0900 Subject: [PATCH] [web-q-and-a] remove unnecessary cell (#309) --- apps/web-crawl-q-and-a/web-qa.ipynb | 96 ----------------------------- 1 file changed, 96 deletions(-) diff --git a/apps/web-crawl-q-and-a/web-qa.ipynb b/apps/web-crawl-q-and-a/web-qa.ipynb index 87c530de..f7f969df 100644 --- a/apps/web-crawl-q-and-a/web-qa.ipynb +++ b/apps/web-crawl-q-and-a/web-qa.ipynb @@ -932,102 +932,6 @@ "df.head()" ] }, - { - "cell_type": "code", - "execution_count": 30, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
textn_tokensembeddings
0blog authors maddie. Maddie Hall - OpenAI ...175[-0.012958061881363392, -0.006103983614593744,...
1blog authors tom. Tom Brown - OpenAI ...228[-0.0053874170407652855, -0.009962032549083233...
2blog openai scholars 2019 final projects. Op...492[0.0019150723237544298, -0.0070442273281514645...
3In this project, I used curiosity-driven explo...478[-0.0067560747265815735, 0.0004431474662851542...
4Results revealed that the optimal RL policies ...499[-0.012868616729974747, 0.0029640409629791975,...
\n", - "
" - ], - "text/plain": [ - " text n_tokens \\\n", - "0 blog authors maddie. Maddie Hall - OpenAI ... 175 \n", - "1 blog authors tom. Tom Brown - OpenAI ... 228 \n", - "2 blog openai scholars 2019 final projects. Op... 492 \n", - "3 In this project, I used curiosity-driven explo... 478 \n", - "4 Results revealed that the optimal RL policies ... 499 \n", - "\n", - " embeddings \n", - "0 [-0.012958061881363392, -0.006103983614593744,... \n", - "1 [-0.0053874170407652855, -0.009962032549083233... \n", - "2 [0.0019150723237544298, -0.0070442273281514645... \n", - "3 [-0.0067560747265815735, 0.0004431474662851542... \n", - "4 [-0.012868616729974747, 0.0029640409629791975,... " - ] - }, - "execution_count": 30, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "from openai.embeddings_utils import distances_from_embeddings\n", - "\n", - "df['embeddings'] = df.text.apply(lambda x: openai.Embedding.create(input=x, engine='text-embedding-ada-002')['data'][0]['embedding'])\n", - "\n", - "df.to_csv('processed/embeddings.csv')\n", - "df.head()" - ] - }, { "cell_type": "code", "execution_count": 31,