diff --git a/__pycache__/utils.cpython-311.pyc b/__pycache__/utils.cpython-311.pyc index 27ee61c9..e43127e3 100644 Binary files a/__pycache__/utils.cpython-311.pyc and b/__pycache__/utils.cpython-311.pyc differ diff --git a/data/documents.json b/data/documents.json index ccc91f32..40071c7b 100644 --- a/data/documents.json +++ b/data/documents.json @@ -1 +1 @@ -{"doc_names": ["1", "2", "3", "audio-1", "audio-2", "Car-Repair-Receipt-repair", "Car-Repair-Receipt-service", "Car-Repair-Receipt-tire", "Car-Repair-Receipt-tuning", "Car-Repair-Receipt-wash", "corolla-2020-toyota-owners-manual", "data\\dodge-challenger-auto-body-repair-after", "data\\dodge-challenger-auto-body-repair-before", "How to change engine oil and filter on TOYOTA Corolla", "How to change front brake pads on TOYOTA Corolla", "How to change front wheel bearing on TOYOTA RAV4 II [TUTORIAL AUTODOC]", "How to change rear wheel bearing on TOYOTA RAV4 II [TUTORIAL AUTODOC]", "How to change rear windshield wipers on TOYOTA Corolla", "How to change spark plugs on TOYOTA COROLLA", "data\\hyundai-sonata-auto-body-repair-after", "data\\hyundai-sonata-auto-body-repair-before", "data\\IMG_1436", "data\\IMG_1437", "data\\IMG_1438", "data\\IMG_1440", "data\\IMG_1441", "data\\IMG_1442", "data\\IMG_1443", "data\\IMG_1444", "data\\pontiac-vibe-auto-body-repair-after", "data\\pontiac-vibe-auto-body-repair-before", "test_rec", "data\\toyota-tacoma-auto-body-repair-after", "data\\toyota-tacoma-auto-body-repair-before"], "docs_id": ["bf82a6b7ca514278ba8932028a25b042", "cfb1612d88634e87951abb081739732c", "0723acf3b939428ead3cceb48100e24b", "0560ebf944a34167a1f229c1044dcfc3", "6ba0680250244342b89c381f5e4e6328", "3c2d5843c3064acbbed980bb582d40f4", "ffeb04e7984544ff836088bb2d02cdae", "0b27e4d6792c4cb9aa7b7dfbcbf49f91", "35bd436246cb43b49d9fc54c258f8ed4", "5396d068e7c34a9b90c5d855d5aca866", "195a6c87111945f2b69b4d7e103d71ce", "064f8868a05c4d64abe7a1a0eef71ba2", "24e52042078c4fb5b958eda35cf46434", "4e95cb740bca4168b35e25a5c836b455", "9314f57385b441a4a292d3ce00ce723a", "28447944861f4fbc92346d48a97aaddc", "2dd4fd849f524c55bdb6dff3d3851e11", "c7d937e4456b40939b616f819b10e722", "059f19a2626e46b4a0807e60086b0f2f", "0fc5a9f521b0403b95c38cbe3c94fda5", "3cd0784c36904989be09aa4eb729bb77", "1a519aac07a142b28bde145d7420529d", "829b10ce5b32482caefc63474193c51f", "c7ca7c530dd34f6d96033717427aeebb", "598c3071c42346ca8897e6abee47e20f", "964b57f2e95a4d34a50107dc552c8891", "55841526690a4c8db8306c5c76a961cb", "d8b2cfc7062747b1be0e63cd54b2c495", "dd09b8faa8cd47d3a73b9c5bb21a5948", "eb818ea381de4ff98bb530e4a80c0fef", "7d8858bca658467dacdabce3fd26f5a6", "db24261507654f7e99b1627f8ea7e3b4", "b6365f8d8e744bb180e93e0d30e8d6d5", "96652ec08a874b4db58e7ede6e17feb3"], "num_pages": [2, 2, 3, 7, 7, 1, 2, 2, 2, 1, 588, 1, 1, 6, 7, 4, 2, 6, 10, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]} \ No newline at end of file +{"doc_names": ["audio-2", "data\\Car-Repair-Receipt-repair", "data\\Car-Repair-Receipt-service", "data\\Car-Repair-Receipt-tire", "data\\Car-Repair-Receipt-tuning", "data\\Car-Repair-Receipt-wash", "data\\corolla-2020-toyota-owners-manual", "data\\dodge-challenger-auto-body-repair-after", "data\\dodge-challenger-auto-body-repair-before", "data\\How to change engine oil and filter on TOYOTA Corolla", "data\\How to change front brake pads on TOYOTA Corolla", "How to change front wheel bearing on TOYOTA RAV4 II [TUTORIAL AUTODOC]", "How to change rear wheel bearing on TOYOTA RAV4 II [TUTORIAL AUTODOC]", "data\\How to change rear windshield wipers on TOYOTA Corolla", "data\\How to change spark plugs on TOYOTA COROLLA", "data\\hyundai-sonata-auto-body-repair-after", "data\\hyundai-sonata-auto-body-repair-before", "data\\IMG_1436", "data\\IMG_1437", "data\\IMG_1438", "data\\IMG_1440", "data\\IMG_1441", "data\\IMG_1442", "data\\IMG_1443", "data\\IMG_1444", "data\\pontiac-vibe-auto-body-repair-after", "data\\pontiac-vibe-auto-body-repair-before", "test_rec", "data\\toyota-tacoma-auto-body-repair-after", "data\\toyota-tacoma-auto-body-repair-before"], "docs_id": ["e7280b3ec313491f8ce5c5d59b52788e", "880e0ad1d2ce43c39716e8d45d584000", "3b1c312fe9d0490ba3b7a841ce3fb136", "a6f5d1b0ba8d4fa7a828fdad8ae17bb7", "41f450a6b2c24af6a45065b2d3eba6e5", "d7af8ae82db341bf818e8f16420a9570", "eb95b3ced46548ba9d18eacba3c3e00c", "806b676fecfd47339c506ece2af3122d", "fcdc8661e11541c0a56c825626f2467e", "5ab12ad4f0ce4ce98e27e56fe5663ebd", "adf95aa758254b069cac03f52f0993b8", "1c3ef8dd242f40418dd34bfd3ce95b8a", "47d4abbea3da4121930fc33b3c472fdf", "10963a5e3985497888ce30cc66ae6314", "111c4a4e07534f47b1ed671ee2b684df", "2aa09a5f3fb54728b8370875ddc3d1fa", "7f902694851e41218ef8498b6c5c1553", "e1b0b06f6dad4c56bf976f6c2135df35", "00564531a33c4896b0d329170ce1f04f", "3aa1149c564c47c4b7b1f6a641e37770", "34a3e18b638b454ba283ba5741bad3a7", "0c7b7bf52d684f198dee19e87a5000bc", "9f1fc0cdcf104e4d948321f0ee5875b9", "113fab4522f94b7b956236b769e391c7", "8a75069c830640b5bddd661adcd612a9", "428d5aa38b9148ef95cf0662d50e0e18", "4cbb1c9f8d8a44feb44b554f9a39bd59", "04fe5073479c462aa819b0131fc9bc9b", "037fd77b66f045a0ac0682a07d57885b", "299625168b8e492baafdbb2a871cd061"], "num_pages": [7, 1, 2, 2, 2, 1, 588, 1, 1, 6, 7, 21, 12, 6, 10, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]} \ No newline at end of file diff --git a/doc-experiment.ipynb b/doc-experiment.ipynb index c82c2670..6f0772d1 100644 --- a/doc-experiment.ipynb +++ b/doc-experiment.ipynb @@ -559,10 +559,24 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 3, "metadata": {}, - "outputs": [], - "source": [] + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "12\n" + ] + } + ], + "source": [ + "# testing something out\n", + "path = '12.pdf'\n", + "# splitting to get the doc name\n", + "doc_name = path.split('/')[-1].split('.')[0]\n", + "print(doc_name)" + ] }, { "cell_type": "code", diff --git a/vec-db/index/faiss_index_data/index.faiss b/index/faiss_index_data/index.faiss similarity index 93% rename from vec-db/index/faiss_index_data/index.faiss rename to index/faiss_index_data/index.faiss index 023cd697..90f5f6b4 100644 Binary files a/vec-db/index/faiss_index_data/index.faiss and b/index/faiss_index_data/index.faiss differ diff --git a/vec-db/index/faiss_index_data/index.pkl b/index/faiss_index_data/index.pkl similarity index 86% rename from vec-db/index/faiss_index_data/index.pkl rename to index/faiss_index_data/index.pkl index e7ddad08..fd62b2c3 100644 Binary files a/vec-db/index/faiss_index_data/index.pkl and b/index/faiss_index_data/index.pkl differ diff --git a/loggings/app.log b/loggings/app.log index 5a766d3e..f3e75e05 100644 --- a/loggings/app.log +++ b/loggings/app.log @@ -354,3 +354,182 @@ To avoid injury, hold up the wheel when unscrewing the bolts. attn_output = torch.nn.functional.scaled_dot_product_attention( 2024-08-14 16:45:56,307 - INFO - Search completed +2024-08-15 02:50:54,898 - INFO - Loading data from ./data +2024-08-15 02:51:13,757 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 02:51:17,730 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 02:51:25,478 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 02:51:29,559 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 02:51:30,838 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 02:51:43,938 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 02:51:48,599 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 02:51:53,119 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 02:51:56,122 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 503 Service Unavailable" +2024-08-15 02:58:26,198 - INFO - Loading data from ./data +2024-08-15 02:58:35,088 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 02:58:39,468 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 02:58:47,928 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 02:58:52,079 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 02:58:53,610 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 02:59:06,807 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 02:59:11,727 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 02:59:17,438 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 02:59:23,060 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 02:59:25,319 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 02:59:58,461 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 03:00:04,908 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 03:00:10,818 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 03:00:16,989 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 03:00:23,071 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 03:00:28,828 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 03:00:34,849 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 03:00:41,339 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 03:00:47,520 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 03:00:51,789 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 03:01:27,979 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 03:01:34,899 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 03:01:41,883 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 03:01:48,668 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 03:01:56,028 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 03:02:02,739 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 03:02:09,347 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 03:02:15,747 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 03:02:22,678 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 03:02:29,228 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 03:02:33,009 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 03:09:51,057 - INFO - Loading data from ./data +2024-08-15 03:11:37,962 - INFO - Loading data from ./data +2024-08-15 03:12:20,149 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 03:12:34,958 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 03:12:43,958 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 03:13:03,545 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 03:13:11,378 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 03:13:17,988 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 03:13:25,790 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 03:20:51,439 - INFO - Loading data from ./data +2024-08-15 03:21:24,219 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 03:21:30,869 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 03:21:37,388 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 03:21:43,899 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 03:21:51,445 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 03:21:57,611 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 03:22:03,099 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 03:23:13,128 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 03:23:18,299 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 03:23:23,898 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 03:23:27,794 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 03:34:01,343 - INFO - Loading data from ./data +2024-08-15 03:34:48,349 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 03:34:57,477 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 03:35:04,349 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 03:35:10,669 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 03:35:16,839 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 03:35:23,719 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 03:35:29,898 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 03:47:20,018 - INFO - Loading data from ./data +2024-08-15 03:48:01,680 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 03:48:09,678 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 03:48:15,919 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 03:48:21,999 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 03:48:28,079 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 03:48:34,320 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 03:48:39,758 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 03:59:23,679 - INFO - Loading data from ./data +2024-08-15 03:59:56,997 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 04:00:03,430 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 04:00:09,989 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 04:00:16,389 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 04:00:22,638 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 04:00:29,189 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 04:00:35,119 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 04:02:05,308 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 04:02:07,939 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 04:02:10,648 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 04:02:13,071 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 04:02:15,268 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 04:02:17,508 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 04:02:19,750 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 04:02:22,469 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 04:02:24,906 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 04:02:27,088 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 04:02:29,509 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 04:02:31,585 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 04:02:34,130 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 04:02:36,878 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 04:02:39,288 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 04:02:41,519 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 04:02:43,744 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 04:02:45,988 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 04:02:48,548 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 04:02:50,788 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 04:02:52,588 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 04:03:16,232 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 04:03:18,798 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 04:03:21,508 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 04:03:23,889 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 04:03:25,963 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 04:03:28,390 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 04:03:30,498 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 04:03:32,388 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 04:03:35,020 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 04:03:37,029 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 04:03:38,990 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 04:03:40,388 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 04:04:13,189 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 04:04:21,340 - INFO - Data loaded +2024-08-15 04:04:21,340 - INFO - Creating vector store +2024-08-15 04:04:23,029 - WARNING - C:\Users\timmy_3aupohg\anaconda3\envs\smog_env\Lib\site-packages\transformers\models\bert\modeling_bert.py:439: UserWarning: 1Torch was not compiled with flash attention. (Triggered internally at C:\cb\pytorch_1000000000000\work\aten\src\ATen\native\transformers\cuda\sdp_utils.cpp:555.) + attn_output = torch.nn.functional.scaled_dot_product_attention( + +2024-08-15 04:04:33,168 - INFO - Vector store created +2024-08-15 04:04:33,168 - INFO - Saving the vector store +2024-08-15 04:04:33,168 - INFO - Vector store saved +2024-08-15 12:42:46,936 - INFO - Loading data from ./data +2024-08-15 12:43:28,300 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 12:43:51,069 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 12:44:11,663 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 12:44:38,182 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 12:44:56,573 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 12:45:09,049 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 12:45:23,111 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 12:46:58,999 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 12:47:06,789 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 12:47:11,359 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 12:47:17,169 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 12:47:20,999 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 12:47:25,946 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 12:47:30,318 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 12:47:34,530 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 12:47:39,720 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 12:47:44,220 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 12:47:50,049 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 12:47:53,917 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 12:47:56,992 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 12:48:00,220 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 12:48:03,059 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 12:48:05,610 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 12:48:09,288 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 12:48:12,578 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 12:48:15,889 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 12:48:18,429 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 12:48:20,202 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 12:48:42,558 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 12:48:44,728 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 12:48:47,235 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 12:48:49,078 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 12:48:51,400 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 12:48:54,129 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 12:48:56,059 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 12:48:57,929 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 12:49:00,270 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 12:49:02,591 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 12:49:04,690 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 12:49:06,053 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 12:49:45,358 - INFO - HTTP Request: POST https://api.groq.com/openai/v1/audio/translations "HTTP/1.1 200 OK" +2024-08-15 12:49:56,013 - INFO - Data loaded +2024-08-15 12:49:56,013 - INFO - Creating vector store +2024-08-15 12:49:57,581 - WARNING - C:\Users\timmy_3aupohg\anaconda3\envs\smog_env\Lib\site-packages\transformers\models\bert\modeling_bert.py:439: UserWarning: 1Torch was not compiled with flash attention. (Triggered internally at C:\cb\pytorch_1000000000000\work\aten\src\ATen\native\transformers\cuda\sdp_utils.cpp:555.) + attn_output = torch.nn.functional.scaled_dot_product_attention( + +2024-08-15 12:50:08,732 - INFO - Vector store created +2024-08-15 12:50:08,732 - INFO - Saving the vector store +2024-08-15 12:50:08,745 - INFO - Vector store saved diff --git a/utils.py b/utils.py index 44223aed..499ff917 100644 --- a/utils.py +++ b/utils.py @@ -10,6 +10,7 @@ from uuid import uuid4 from langchain_core.documents import Document from text_extractor import TextExtractor import os +import math import json from groq import Groq import re @@ -213,10 +214,10 @@ def split_audio_by_duration(audio_file_path, chunk_duration_minutes, print_outpu chunk_paths = [] if audio_duration_ms > chunk_length_ms: - # Calculate the number of chunks - num_chunks = audio_duration_ms // chunk_length_ms + (1 if audio_duration_ms % chunk_length_ms != 0 else 0) + # Calculate the number of chunks, using math.ceil to ensure rounding up + num_chunks = math.ceil(audio_duration_ms / chunk_length_ms) - for i in range(num_chunks): + for i in range(int(num_chunks)): start_ms = i * chunk_length_ms end_ms = min(start_ms + chunk_length_ms, audio_duration_ms) chunk = audio[start_ms:end_ms] @@ -299,7 +300,7 @@ def preprocess_video_data(video_path: str, time_interval: int): video_name = os.path.splitext(os.path.basename(video_path))[0] # Create a directory for snapshots using the video name - snapshot_dir = os.path.join(os.path.dirname(video_path), f"{video_name}_snapshots") + snapshot_dir = os.path.join(os.path.dirname(video_path), f"{video_name}") os.makedirs(snapshot_dir, exist_ok=True) # Get the duration of the video using ffmpeg @@ -308,15 +309,19 @@ def preprocess_video_data(video_path: str, time_interval: int): # Loop through the video and take snapshots at 0s, 3min, 6min, etc. for i in range(0, int(duration), time_interval): - # Calculate the time for the current frame - frame_time = i + start_time = i + end_time = min(i + time_interval, int(duration)) + + # Format the interval as 'start-end' + interval_str = f"{start_time}-{end_time}" + # Save the snapshot as an image file in the created folder - frame_img = os.path.join(snapshot_dir, f"frame_at_{frame_time//60}min.png") + frame_img = os.path.join(snapshot_dir, f"{interval_str}s.png") # Extract the frame using ffmpeg ( ffmpeg - .input(video_path, ss=frame_time) + .input(video_path, ss=start_time) .output(frame_img, vframes=1) .run() ) @@ -326,6 +331,9 @@ def preprocess_video_data(video_path: str, time_interval: int): # now creating document from the audio file documents = create_audio_document(audio_path, chunk_duration_minutes=0.5, file_type='video') + + # deleting the audio file + os.remove(audio_path) return documents @@ -333,11 +341,11 @@ def preprocess_video_data(video_path: str, time_interval: int): #-----------------------------------------------------OTHERS-------------------------------------------------------------- def save_embedded_data(embeddings, key="data"): - embeddings.save_local(f"vec-db/index/faiss_index_{key}") + embeddings.save_local(f"index/faiss_index_{key}") print("Embeddings saved") def load_embedded_data(embeddings=embeddings, key="data"): - embed_db = FAISS.load_local(f"vec-db/index/faiss_index_{key}", embeddings, allow_dangerous_deserialization=True) + embed_db = FAISS.load_local(f"index/faiss_index_{key}", embeddings, allow_dangerous_deserialization=True) return embed_db @@ -361,7 +369,7 @@ def load_documents_from_directory(directory_path: str): # updating the path path = os.path.join(directory_path, file) # getting the file extension and doc name - doc_name, extension = file.split('.')[0] , file.split('.')[-1] + doc_name, extension = path.split('/')[-1].split('.')[0] , file.split('.')[-1] # checking if the file is a text document if extension in text_doc: # loading the document diff --git a/video_experiment.ipynb b/video_experiment.ipynb index 1c0454bf..1156d87b 100644 --- a/video_experiment.ipynb +++ b/video_experiment.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": 1, + "execution_count": 2, "metadata": {}, "outputs": [], "source": [ @@ -12,7 +12,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 3, "metadata": {}, "outputs": [], "source": [ @@ -32,7 +32,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 11, "metadata": {}, "outputs": [], "source": [ @@ -58,7 +58,7 @@ " video_name = os.path.splitext(os.path.basename(video_path))[0]\n", "\n", " # Create a directory for snapshots using the video name\n", - " snapshot_dir = os.path.join(os.path.dirname(video_path), f\"{video_name}_snapshots\")\n", + " snapshot_dir = os.path.join(os.path.dirname(video_path), f\"{video_name}\")\n", " os.makedirs(snapshot_dir, exist_ok=True)\n", "\n", " # Set the interval to 3 minutes (180 seconds)\n", @@ -70,15 +70,19 @@ "\n", " # Loop through the video and take snapshots at 0s, 3min, 6min, etc.\n", " for i in range(0, int(duration), interval):\n", - " # Calculate the time for the current frame\n", - " frame_time = i\n", + " start_time = i\n", + " end_time = min(i + interval, int(duration))\n", + " \n", + " # Format the interval as 'start-end'\n", + " interval_str = f\"{start_time}-{end_time}\"\n", + " \n", " # Save the snapshot as an image file in the created folder\n", - " frame_img = os.path.join(snapshot_dir, f\"frame_at_{frame_time//60}min.png\")\n", + " frame_img = os.path.join(snapshot_dir, f\"frame_at_{interval_str}s.png\")\n", " \n", " # Extract the frame using ffmpeg\n", " (\n", " ffmpeg\n", - " .input(video_path, ss=frame_time)\n", + " .input(video_path, ss=start_time)\n", " .output(frame_img, vframes=1)\n", " .run()\n", " )\n", @@ -87,14 +91,17 @@ " \n", " \n", " # now creating document from the audio file\n", - " documents = create_audio_document(audio_path, file_type='video')\n", + " documents = create_audio_document(audio_path, file_type='video', chunk_duration_minutes=0.5)\n", + " \n", + " # deleting the audio file\n", + " os.remove(audio_path)\n", " return documents\n", "\n" ] }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 12, "metadata": {}, "outputs": [ { @@ -116,34 +123,68 @@ "output_type": "stream", "text": [ "MoviePy - Done.\n", - "Snapshots saved in data\\How to change front wheel bearing on TOYOTA RAV4 II [TUTORIAL AUTODOC]_snapshots.\n", + "Snapshots saved in data\\How to change front wheel bearing on TOYOTA RAV4 II [TUTORIAL AUTODOC].\n", "Exporting How to change front wheel bearing on TOYOTA RAV4 II [TUTORIAL AUTODOC]_chunks/How to change front wheel bearing on TOYOTA RAV4 II [TUTORIAL AUTODOC]_chunk1.mp3\n", "Exporting How to change front wheel bearing on TOYOTA RAV4 II [TUTORIAL AUTODOC]_chunks/How to change front wheel bearing on TOYOTA RAV4 II [TUTORIAL AUTODOC]_chunk2.mp3\n", "Exporting How to change front wheel bearing on TOYOTA RAV4 II [TUTORIAL AUTODOC]_chunks/How to change front wheel bearing on TOYOTA RAV4 II [TUTORIAL AUTODOC]_chunk3.mp3\n", - "Exporting How to change front wheel bearing on TOYOTA RAV4 II [TUTORIAL AUTODOC]_chunks/How to change front wheel bearing on TOYOTA RAV4 II [TUTORIAL AUTODOC]_chunk4.mp3\n" + "Exporting How to change front wheel bearing on TOYOTA RAV4 II [TUTORIAL AUTODOC]_chunks/How to change front wheel bearing on TOYOTA RAV4 II [TUTORIAL AUTODOC]_chunk4.mp3\n", + "Exporting How to change front wheel bearing on TOYOTA RAV4 II [TUTORIAL AUTODOC]_chunks/How to change front wheel bearing on TOYOTA RAV4 II [TUTORIAL AUTODOC]_chunk5.mp3\n", + "Exporting How to change front wheel bearing on TOYOTA RAV4 II [TUTORIAL AUTODOC]_chunks/How to change front wheel bearing on TOYOTA RAV4 II [TUTORIAL AUTODOC]_chunk6.mp3\n", + "Exporting How to change front wheel bearing on TOYOTA RAV4 II [TUTORIAL AUTODOC]_chunks/How to change front wheel bearing on TOYOTA RAV4 II [TUTORIAL AUTODOC]_chunk7.mp3\n", + "Exporting How to change front wheel bearing on TOYOTA RAV4 II [TUTORIAL AUTODOC]_chunks/How to change front wheel bearing on TOYOTA RAV4 II [TUTORIAL AUTODOC]_chunk8.mp3\n", + "Exporting How to change front wheel bearing on TOYOTA RAV4 II [TUTORIAL AUTODOC]_chunks/How to change front wheel bearing on TOYOTA RAV4 II [TUTORIAL AUTODOC]_chunk9.mp3\n", + "Exporting How to change front wheel bearing on TOYOTA RAV4 II [TUTORIAL AUTODOC]_chunks/How to change front wheel bearing on TOYOTA RAV4 II [TUTORIAL AUTODOC]_chunk10.mp3\n", + "Exporting How to change front wheel bearing on TOYOTA RAV4 II [TUTORIAL AUTODOC]_chunks/How to change front wheel bearing on TOYOTA RAV4 II [TUTORIAL AUTODOC]_chunk11.mp3\n", + "Exporting How to change front wheel bearing on TOYOTA RAV4 II [TUTORIAL AUTODOC]_chunks/How to change front wheel bearing on TOYOTA RAV4 II [TUTORIAL AUTODOC]_chunk12.mp3\n", + "Exporting How to change front wheel bearing on TOYOTA RAV4 II [TUTORIAL AUTODOC]_chunks/How to change front wheel bearing on TOYOTA RAV4 II [TUTORIAL AUTODOC]_chunk13.mp3\n", + "Exporting How to change front wheel bearing on TOYOTA RAV4 II [TUTORIAL AUTODOC]_chunks/How to change front wheel bearing on TOYOTA RAV4 II [TUTORIAL AUTODOC]_chunk14.mp3\n", + "Exporting How to change front wheel bearing on TOYOTA RAV4 II [TUTORIAL AUTODOC]_chunks/How to change front wheel bearing on TOYOTA RAV4 II [TUTORIAL AUTODOC]_chunk15.mp3\n", + "Exporting How to change front wheel bearing on TOYOTA RAV4 II [TUTORIAL AUTODOC]_chunks/How to change front wheel bearing on TOYOTA RAV4 II [TUTORIAL AUTODOC]_chunk16.mp3\n", + "Exporting How to change front wheel bearing on TOYOTA RAV4 II [TUTORIAL AUTODOC]_chunks/How to change front wheel bearing on TOYOTA RAV4 II [TUTORIAL AUTODOC]_chunk17.mp3\n", + "Exporting How to change front wheel bearing on TOYOTA RAV4 II [TUTORIAL AUTODOC]_chunks/How to change front wheel bearing on TOYOTA RAV4 II [TUTORIAL AUTODOC]_chunk18.mp3\n", + "Exporting How to change front wheel bearing on TOYOTA RAV4 II [TUTORIAL AUTODOC]_chunks/How to change front wheel bearing on TOYOTA RAV4 II [TUTORIAL AUTODOC]_chunk19.mp3\n", + "Exporting How to change front wheel bearing on TOYOTA RAV4 II [TUTORIAL AUTODOC]_chunks/How to change front wheel bearing on TOYOTA RAV4 II [TUTORIAL AUTODOC]_chunk20.mp3\n", + "Exporting How to change front wheel bearing on TOYOTA RAV4 II [TUTORIAL AUTODOC]_chunks/How to change front wheel bearing on TOYOTA RAV4 II [TUTORIAL AUTODOC]_chunk21.mp3\n" ] } ], "source": [ "# Implementing the function\n", - "documents = preprocess_video_data(video_path, 180)" + "documents = preprocess_video_data(video_path, 30)" ] }, { "cell_type": "code", - "execution_count": 5, + "execution_count": null, "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "[Document(metadata={'filename': 'How to change front wheel bearing on TOYOTA RAV4 II [TUTORIAL AUTODOC]', 'duration': '0-3 minutes', 'file_type': 'video'}, page_content=\" Hi everybody! Here's the latest installment of AutoDoc's video tutorials on replacing car parts. The channel so you never miss a video. We post new ones every week!\"),\n", - " Document(metadata={'filename': 'How to change front wheel bearing on TOYOTA RAV4 II [TUTORIAL AUTODOC]', 'duration': '3-6 minutes', 'file_type': 'video'}, page_content=\" How to make a You can buy spare parts from us on our website or in the Autodoc app. I'm going to make a hole in the bottom of the box. I'm going to make a hole in the bottom of the box. I'm going to make a hole in the bottom of the box. I'm going to make a hole in the bottom of the box. I'm going to make a hole in the bottom of the box. I'm going to make a hole in the bottom of the box. I'm going to make a hole in the bottom of the box. I'm going to make a hole in the bottom of the box. I'm going to make a hole in the bottom of the box. I'm going to make a hole in the bottom of the box. I'm going to make a hole in the bottom of the box. I'm going to make a hole in the bottom of the box. I'm going to make a hole in the bottom of the box. I'm going to make a hole in the bottom of the box. 15. Remove the rear window cover. 16. Remove the rear window cover. 17. Remove the rear window cover. 18. Remove the rear window cover. 19. Remove the rear window cover. I'll see you next time.\"),\n", - " Document(metadata={'filename': 'How to change front wheel bearing on TOYOTA RAV4 II [TUTORIAL AUTODOC]', 'duration': '6-9 minutes', 'file_type': 'video'}, page_content=\" How to make a Are you interested in this product? All links can be found in the description. I'm going to make a hole in the bottom of the box. I'm going to make a hole in the bottom of the box. I'm going to make a hole in the bottom of the box. I'm going to make a hole in the bottom of the box. I'm going to make a hole in the bottom of the box. Add the so I going to make a fire with a fire extinguisher I going to make a fire with a fire extinguisher I'm going to make a fire with a fire extinguisher. I'm going to make a fire with a fire extinguisher. I'm going to make a fire with a fire extinguisher. The\"),\n", - " Document(metadata={'filename': 'How to change front wheel bearing on TOYOTA RAV4 II [TUTORIAL AUTODOC]', 'duration': '9-12 minutes', 'file_type': 'video'}, page_content=\" I'm going to make a new one. I'm going to make a new one. I'm going to make a new one. I'm going to make a new one. I'm going to make a new one. I'm going to make a new one. I'm going to make a new one. I'm going to make a new one. I'm going to make a new one. I'm going to make a new one. I'm going to make a new one. I'm going to make a new one. I'm going to make a new one. I'm going to make a new one. Thank you for watching our video tutorials. If you enjoyed watching, click thumbs up and share it with your friends. Have a nice day! Follow us on social media. Find us on Instagram and TikTok!\")]" + "[Document(metadata={'filename': 'How to change front wheel bearing on TOYOTA RAV4 II [TUTORIAL AUTODOC]', 'duration': '0.0-0.5 minutes', 'file_type': 'video'}, page_content=\" Hi everybody! Here is the latest installment of AutoDoc's video tutorials on replacing car parts.\"),\n", + " Document(metadata={'filename': 'How to change front wheel bearing on TOYOTA RAV4 II [TUTORIAL AUTODOC]', 'duration': '0.5-1.0 minutes', 'file_type': 'video'}, page_content=''),\n", + " Document(metadata={'filename': 'How to change front wheel bearing on TOYOTA RAV4 II [TUTORIAL AUTODOC]', 'duration': '1.0-1.5 minutes', 'file_type': 'video'}, page_content=\" I'm going to use a plastic to prevent the air from coming out. I'm going to use a plastic to prevent the air from coming out. I'm going to use a plastic to prevent the air from coming out. I'm going to use a plastic to prevent the air from coming out. I'm going to use a plastic to prevent the air from coming out. I'm going to use a plastic to prevent the air from coming out. I'm going to use a plastic to prevent the air from coming out. I'm going to use a plastic to prevent the air from coming out. I'm going to use a plastic to prevent the air from coming out. I'm going to use a plastic to prevent the air from coming out.\"),\n", + " Document(metadata={'filename': 'How to change front wheel bearing on TOYOTA RAV4 II [TUTORIAL AUTODOC]', 'duration': '1.5-2.0 minutes', 'file_type': 'video'}, page_content=' The week.'),\n", + " Document(metadata={'filename': 'How to change front wheel bearing on TOYOTA RAV4 II [TUTORIAL AUTODOC]', 'duration': '2.0-2.5 minutes', 'file_type': 'video'}, page_content=''),\n", + " Document(metadata={'filename': 'How to change front wheel bearing on TOYOTA RAV4 II [TUTORIAL AUTODOC]', 'duration': '2.5-3.0 minutes', 'file_type': 'video'}, page_content=''),\n", + " Document(metadata={'filename': 'How to change front wheel bearing on TOYOTA RAV4 II [TUTORIAL AUTODOC]', 'duration': '3.0-3.5 minutes', 'file_type': 'video'}, page_content=' 15. Install the new Thanks for watching!'),\n", + " Document(metadata={'filename': 'How to change front wheel bearing on TOYOTA RAV4 II [TUTORIAL AUTODOC]', 'duration': '3.5-4.0 minutes', 'file_type': 'video'}, page_content=\" I'm going to make a new one. I'm going to make a new one. I'm going to make a new one. I'm going to make a new one. I'm going to make a new one. I'm going to make a new one. I'm going to make a new one. I'm going to make a new one. I'm going to make a new one. I'm going to make a new one. I'm going to make a new one. I'm going to make a new one. I'm going to make a new one. I'm going to make a new one. you\"),\n", + " Document(metadata={'filename': 'How to change front wheel bearing on TOYOTA RAV4 II [TUTORIAL AUTODOC]', 'duration': '4.0-4.5 minutes', 'file_type': 'video'}, page_content=''),\n", + " Document(metadata={'filename': 'How to change front wheel bearing on TOYOTA RAV4 II [TUTORIAL AUTODOC]', 'duration': '4.5-5.0 minutes', 'file_type': 'video'}, page_content=' You can buy spare parts from us on our website or in the Autodoc app.'),\n", + " Document(metadata={'filename': 'How to change front wheel bearing on TOYOTA RAV4 II [TUTORIAL AUTODOC]', 'duration': '5.0-5.5 minutes', 'file_type': 'video'}, page_content=\" I'm going to make a fire with a fire extinguisher. I'll make a fire with a fire extinguisher. I'll make a fire with a fire extinguisher. I'll make a fire with a fire extinguisher. I'll make a fire with a fire extinguisher.\"),\n", + " Document(metadata={'filename': 'How to change front wheel bearing on TOYOTA RAV4 II [TUTORIAL AUTODOC]', 'duration': '5.5-6.0 minutes', 'file_type': 'video'}, page_content=''),\n", + " Document(metadata={'filename': 'How to change front wheel bearing on TOYOTA RAV4 II [TUTORIAL AUTODOC]', 'duration': '6.0-6.5 minutes', 'file_type': 'video'}, page_content=' Are you interested in this product? All links can be found in the description.'),\n", + " Document(metadata={'filename': 'How to change front wheel bearing on TOYOTA RAV4 II [TUTORIAL AUTODOC]', 'duration': '6.5-7.0 minutes', 'file_type': 'video'}, page_content=\" I'm going to make a fire with a fire-breathing gun. I'm going to make a fire with a fire-breathing gun. I'm going to make a fire with a fire-breathing gun. I'm going to make a fire with a fire-breathing gun. I'm going to make a fire with a fire-breathing gun. I'm going to make a fire with a fire-breathing gun. I'm going to make a fire with a fire-breathing gun. I'm going to make a fire with a fire-breathing gun. I'm going to make a fire with a fire-breathing gun. I'm going to make a fire with a fire-breathing gun. I'm going to make a fire with a fire-breathing gun. I'm going to make a fire with a fire-breathing gun. I'm going to make a fire with a fire-breathing gun. Thanks for watching!\"),\n", + " Document(metadata={'filename': 'How to change front wheel bearing on TOYOTA RAV4 II [TUTORIAL AUTODOC]', 'duration': '7.0-7.5 minutes', 'file_type': 'video'}, page_content=\" I'm going to make a fire with a fire extinguisher. I'm going to make a fire with a fire extinguisher. I'm going to make a fire with a fire extinguisher. I'm going to make a fire with a fire extinguisher. I'm going to make a fire with a fire extinguisher.\"),\n", + " Document(metadata={'filename': 'How to change front wheel bearing on TOYOTA RAV4 II [TUTORIAL AUTODOC]', 'duration': '7.5-8.0 minutes', 'file_type': 'video'}, page_content=' The Share this video if you found it interesting.'),\n", + " Document(metadata={'filename': 'How to change front wheel bearing on TOYOTA RAV4 II [TUTORIAL AUTODOC]', 'duration': '8.0-8.5 minutes', 'file_type': 'video'}, page_content=''),\n", + " Document(metadata={'filename': 'How to change front wheel bearing on TOYOTA RAV4 II [TUTORIAL AUTODOC]', 'duration': '8.5-9.0 minutes', 'file_type': 'video'}, page_content=''),\n", + " Document(metadata={'filename': 'How to change front wheel bearing on TOYOTA RAV4 II [TUTORIAL AUTODOC]', 'duration': '9.0-9.5 minutes', 'file_type': 'video'}, page_content=\" I'm going to make a new one. I'm going to make a new one. I'm going to make a new one. I'm going to make a new one. I'm going to make a new one. I'm going to make a new one. I'm going to make a new one. I'm going to make a new one. I'm going to make a new one. I'm going to make a new one. I'm going to make a new one. I'm going to make a new one. I'm going to make a new one. I'm going to make a new one.\"),\n", + " Document(metadata={'filename': 'How to change front wheel bearing on TOYOTA RAV4 II [TUTORIAL AUTODOC]', 'duration': '9.5-10.0 minutes', 'file_type': 'video'}, page_content=' Thank you for watching our video tutorials. If you enjoyed watching, click thumbs up and share it with your friends. Have a nice day! Follow us on social media. Find us on Instagram and TikTok.'),\n", + " Document(metadata={'filename': 'How to change front wheel bearing on TOYOTA RAV4 II [TUTORIAL AUTODOC]', 'duration': '10.0-10.5 minutes', 'file_type': 'video'}, page_content='')]" ] }, - "execution_count": 5, + "execution_count": 10, "metadata": {}, "output_type": "execute_result" }