diff --git "a/Notebooks/TEST.ipynb" "b/Notebooks/TEST.ipynb" --- "a/Notebooks/TEST.ipynb" +++ "b/Notebooks/TEST.ipynb" @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": 20, + "execution_count": 6, "metadata": { "colab": { "base_uri": "https://localhost:8080/", @@ -28,7 +28,7 @@ "'e:\\\\gradution project'" ] }, - "execution_count": 20, + "execution_count": 6, "metadata": {}, "output_type": "execute_result" } @@ -43,7 +43,7 @@ }, { "cell_type": "code", - "execution_count": 21, + "execution_count": 7, "metadata": { "colab": { "base_uri": "https://localhost:8080/" @@ -79,39 +79,59 @@ "from src.similarity_model import train_embedding_engine\n", "from src.similarity_model import search_by_text\n", "from src.similarity_model import find_similar_projects\n", + "from Data.database.sql_connector import (\n", + " load_preprocessed_projects,\n", + " engine\n", + ")\n", "\n", "print(\"All modules imported successfully\")" ] }, { "cell_type": "code", - "execution_count": 22, - "metadata": { - "colab": { - "base_uri": "https://localhost:8080/", - "height": 712 - }, - "executionInfo": { - "elapsed": 93, - "status": "ok", - "timestamp": 1777121887495, - "user": { - "displayName": "yossef assem", - "userId": "00346058032754430335" - }, - "user_tz": -180 - }, - "id": "QlD5ukNTDS6S", - "outputId": "43dab901-85ac-4386-d77a-2bb24af4b111" - }, + "execution_count": 9, + "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Rows: 301\n" + "Engine created\n" ] - }, + } + ], + "source": [ + "from sqlalchemy import create_engine\n", + "import urllib\n", + "\n", + "SERVER = \"innotrack-sql-server.database.windows.net\"\n", + "DATABASE = \"InnoTrackDB\"\n", + "USERNAME = \"innotrackadmin\"\n", + "PASSWORD = \"Innotrack@admin233\"\n", + "\n", + "params = urllib.parse.quote_plus(\n", + " f\"DRIVER={{ODBC Driver 18 for SQL Server}};\"\n", + " f\"SERVER={SERVER};\"\n", + " f\"DATABASE={DATABASE};\"\n", + " f\"UID={USERNAME};\"\n", + " f\"PWD={PASSWORD};\"\n", + " \"Encrypt=yes;\"\n", + " \"TrustServerCertificate=no;\"\n", + " \"Connection Timeout=30;\"\n", + ")\n", + "\n", + "engine = create_engine(\n", + " f\"mssql+pyodbc:///?odbc_connect={params}\"\n", + ")\n", + "\n", + "print(\"Engine created\")" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [ { "data": { "text/html": [ @@ -133,199 +153,273 @@ " \n", " \n", " \n", - " ID\n", - " Submitted At\n", - " Title\n", - " Student Names\n", - " Supervisor\n", - " Year\n", - " Category\n", - " Technologies\n", - " Keywords\n", - " Abstract\n", - " Description\n", - " Problem Statement\n", - " Proposed Solution\n", - " Objectives\n", - " ai summary\n", + " TABLE_NAME\n", " \n", " \n", " \n", " \n", - " 296\n", - " OCR_36\n", - " NaT\n", - " Find Missing people using Face Recognition\n", - " NaN\n", - " Dr. Mai Kamal\n", - " 2023\n", - " surveillance\n", - " kotlin, python flask\n", - " artificial intelligence, machine learning, dee...\n", - " Our project \"Find Missed People Using Face Rec...\n", - " The problem of missing persons and children is...\n", - " • The absence of a dedicated digital system fo...\n", - " Our project \"Find Missed People Using Face Rec...\n", - " • Develop a user-friendly application accessib...\n", - " This graduation project, titled \"Find Missing ...\n", + " 0\n", + " Teams\n", + " \n", + " \n", + " 1\n", + " ChatRooms\n", + " \n", + " \n", + " 2\n", + " JoinRequests\n", + " \n", + " \n", + " 3\n", + " Projects\n", + " \n", + " \n", + " 4\n", + " TeamMembers\n", + " \n", + " \n", + " 5\n", + " ChatMessages\n", + " \n", + " \n", + " 6\n", + " Feedbacks\n", + " \n", + " \n", + " 7\n", + " OriginalityReports\n", + " \n", + " \n", + " 8\n", + " ProjectAttachments\n", + " \n", + " \n", + " 9\n", + " ProjectTechnologies\n", + " \n", + " \n", + " 10\n", + " VectorEmbeddings\n", + " \n", + " \n", + " 11\n", + " ChatMessageAttachments\n", " \n", " \n", - " 297\n", - " OCR_37\n", - " NaT\n", - " Remember Me Early diagnosis of Alzheimer's dis...\n", - " NaN\n", - " Dr. Mostafa Elgendy\n", - " 2023\n", - " medical\n", - " dart, flutter, HTML, css, js, php, mvc approac...\n", - " healthcare, medical diagnosis, patient care, m...\n", - " According to the WHO, around 50 million people...\n", - " In this project, we aimed to collect all the t...\n", - " • The absence of a dedicated digital system fo...\n", - " According to the WHO, around 50 million people...\n", - " • Develop a user-friendly application accessib...\n", - " This graduation project, titled \"Remember Me E...\n", + " 12\n", + " SimilarProjects\n", " \n", " \n", - " 298\n", - " OCR_40\n", - " NaT\n", - " Mobile Based System for Traffic Monitoring and...\n", - " NaN\n", - " Dr. Sahr fawzy\n", - " 2012\n", - " General\n", - " Android\n", - " general, software system, graduation project, ...\n", - " The theme of the system/application is the usa...\n", - " No one can ignore the fact that traffic proble...\n", - " • The absence of a dedicated digital system fo...\n", - " The theme of the system/application is the usa...\n", - " • Develop a user-friendly application accessib...\n", - " This graduation project, titled \"Mobile Based ...\n", + " 13\n", + " AuditLogs\n", " \n", " \n", - " 299\n", - " OCR_41\n", - " NaT\n", - " Detecting Diseases Using Chatbot and Booking C...\n", - " NaN\n", - " Dr. Shadia Sarhan\n", - " 2024\n", - " medical\n", - " php, laravel, mysql, mvc, livewire package, ui...\n", - " healthcare, medical diagnosis, patient care, m...\n", - " A Project aim to create application that conta...\n", - " Many pcople find difficult to search for docto...\n", - " • The absence of a dedicated digital system fo...\n", - " A Project aim to create application that conta...\n", - " • Develop a user-friendly application accessib...\n", - " This graduation project, titled \"Detecting Dis...\n", + " 14\n", + " AcademicYears\n", " \n", " \n", - " 300\n", - " OCR_46\n", - " NaT\n", - " Electronic School\n", - " NaN\n", - " Dr. Shaker Elsabagh\n", - " 2022\n", - " Education\n", - " html, css, JavaScript, jquery, bootstrap, api\n", - " e-learning, education platform, student manage...\n", - " Human history is observing a very strange time...\n", - " The world we live in has been through a lot of...\n", - " • The absence of a dedicated digital system fo...\n", - " Human history is observing a very strange time...\n", - " • Achieve accurate and reliable detection/diag...\n", - " This graduation project, titled \"Electronic Sc...\n", + " 15\n", + " Schema\n", + " \n", + " \n", + " 16\n", + " Job\n", + " \n", + " \n", + " 17\n", + " State\n", + " \n", + " \n", + " 18\n", + " JobParameter\n", + " \n", + " \n", + " 19\n", + " JobQueue\n", + " \n", + " \n", + " 20\n", + " database_firewall_rules\n", + " \n", + " \n", + " 21\n", + " Server\n", + " \n", + " \n", + " 22\n", + " List\n", + " \n", + " \n", + " 23\n", + " Set\n", + " \n", + " \n", + " 24\n", + " Counter\n", + " \n", + " \n", + " 25\n", + " Hash\n", + " \n", + " \n", + " 26\n", + " AggregatedCounter\n", + " \n", + " \n", + " 27\n", + " __EFMigrationsHistory\n", + " \n", + " \n", + " 28\n", + " Departments\n", + " \n", + " \n", + " 29\n", + " Skills_Backup\n", + " \n", + " \n", + " 30\n", + " Projects_Backup\n", + " \n", + " \n", + " 31\n", + " Domains\n", + " \n", + " \n", + " 32\n", + " PreProcessed_Projects\n", + " \n", + " \n", + " 33\n", + " Skills\n", + " \n", + " \n", + " 34\n", + " Technologies\n", + " \n", + " \n", + " 35\n", + " Users\n", + " \n", + " \n", + " 36\n", + " Notifications\n", + " \n", + " \n", + " 37\n", + " StudentSkills\n", " \n", " \n", "\n", "" ], "text/plain": [ - " ID Submitted At Title \\\n", - "296 OCR_36 NaT Find Missing people using Face Recognition \n", - "297 OCR_37 NaT Remember Me Early diagnosis of Alzheimer's dis... \n", - "298 OCR_40 NaT Mobile Based System for Traffic Monitoring and... \n", - "299 OCR_41 NaT Detecting Diseases Using Chatbot and Booking C... \n", - "300 OCR_46 NaT Electronic School \n", - "\n", - " Student Names Supervisor Year Category \\\n", - "296 NaN Dr. Mai Kamal 2023 surveillance \n", - "297 NaN Dr. Mostafa Elgendy 2023 medical \n", - "298 NaN Dr. Sahr fawzy 2012 General \n", - "299 NaN Dr. Shadia Sarhan 2024 medical \n", - "300 NaN Dr. Shaker Elsabagh 2022 Education \n", - "\n", - " Technologies \\\n", - "296 kotlin, python flask \n", - "297 dart, flutter, HTML, css, js, php, mvc approac... \n", - "298 Android \n", - "299 php, laravel, mysql, mvc, livewire package, ui... \n", - "300 html, css, JavaScript, jquery, bootstrap, api \n", - "\n", - " Keywords \\\n", - "296 artificial intelligence, machine learning, dee... \n", - "297 healthcare, medical diagnosis, patient care, m... \n", - "298 general, software system, graduation project, ... \n", - "299 healthcare, medical diagnosis, patient care, m... \n", - "300 e-learning, education platform, student manage... \n", - "\n", - " Abstract \\\n", - "296 Our project \"Find Missed People Using Face Rec... \n", - "297 According to the WHO, around 50 million people... \n", - "298 The theme of the system/application is the usa... \n", - "299 A Project aim to create application that conta... \n", - "300 Human history is observing a very strange time... \n", - "\n", - " Description \\\n", - "296 The problem of missing persons and children is... \n", - "297 In this project, we aimed to collect all the t... \n", - "298 No one can ignore the fact that traffic proble... \n", - "299 Many pcople find difficult to search for docto... \n", - "300 The world we live in has been through a lot of... \n", - "\n", - " Problem Statement \\\n", - "296 • The absence of a dedicated digital system fo... \n", - "297 • The absence of a dedicated digital system fo... \n", - "298 • The absence of a dedicated digital system fo... \n", - "299 • The absence of a dedicated digital system fo... \n", - "300 • The absence of a dedicated digital system fo... \n", - "\n", - " Proposed Solution \\\n", - "296 Our project \"Find Missed People Using Face Rec... \n", - "297 According to the WHO, around 50 million people... \n", - "298 The theme of the system/application is the usa... \n", - "299 A Project aim to create application that conta... \n", - "300 Human history is observing a very strange time... \n", - "\n", - " Objectives \\\n", - "296 • Develop a user-friendly application accessib... \n", - "297 • Develop a user-friendly application accessib... \n", - "298 • Develop a user-friendly application accessib... \n", - "299 • Develop a user-friendly application accessib... \n", - "300 • Achieve accurate and reliable detection/diag... \n", - "\n", - " ai summary \n", - "296 This graduation project, titled \"Find Missing ... \n", - "297 This graduation project, titled \"Remember Me E... \n", - "298 This graduation project, titled \"Mobile Based ... \n", - "299 This graduation project, titled \"Detecting Dis... \n", - "300 This graduation project, titled \"Electronic Sc... " + " TABLE_NAME\n", + "0 Teams\n", + "1 ChatRooms\n", + "2 JoinRequests\n", + "3 Projects\n", + "4 TeamMembers\n", + "5 ChatMessages\n", + "6 Feedbacks\n", + "7 OriginalityReports\n", + "8 ProjectAttachments\n", + "9 ProjectTechnologies\n", + "10 VectorEmbeddings\n", + "11 ChatMessageAttachments\n", + "12 SimilarProjects\n", + "13 AuditLogs\n", + "14 AcademicYears\n", + "15 Schema\n", + "16 Job\n", + "17 State\n", + "18 JobParameter\n", + "19 JobQueue\n", + "20 database_firewall_rules\n", + "21 Server\n", + "22 List\n", + "23 Set\n", + "24 Counter\n", + "25 Hash\n", + "26 AggregatedCounter\n", + "27 __EFMigrationsHistory\n", + "28 Departments\n", + "29 Skills_Backup\n", + "30 Projects_Backup\n", + "31 Domains\n", + "32 PreProcessed_Projects\n", + "33 Skills\n", + "34 Technologies\n", + "35 Users\n", + "36 Notifications\n", + "37 StudentSkills" ] }, - "execution_count": 22, + "execution_count": 10, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "file_path = r\"E:\\gradution project\\Data\\raw\\Graduation Projects - Sheet1.xlsx\"\n", + "with engine.connect() as conn:\n", + "\n", + " tables = pd.read_sql(\n", + " \"\"\"\n", + " SELECT TABLE_NAME\n", + " FROM INFORMATION_SCHEMA.TABLES\n", + " \"\"\",\n", + " conn\n", + " )\n", + "\n", + "tables" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 712 + }, + "executionInfo": { + "elapsed": 93, + "status": "ok", + "timestamp": 1777121887495, + "user": { + "displayName": "yossef assem", + "userId": "00346058032754430335" + }, + "user_tz": -180 + }, + "id": "QlD5ukNTDS6S", + "outputId": "43dab901-85ac-4386-d77a-2bb24af4b111" + }, + "outputs": [ + { + "ename": "FileNotFoundError", + "evalue": "[Errno 2] No such file or directory: 'E:\\\\gradution project\\\\Data\\\\raw\\\\Graduation Projects - Sheet1.xlsx'", + "output_type": "error", + "traceback": [ + "\u001b[31m---------------------------------------------------------------------------\u001b[39m", + "\u001b[31mFileNotFoundError\u001b[39m Traceback (most recent call last)", + "\u001b[36mCell\u001b[39m\u001b[36m \u001b[39m\u001b[32mIn[3]\u001b[39m\u001b[32m, line 3\u001b[39m\n\u001b[32m 1\u001b[39m file_path = \u001b[33mr\"E:\\gradution project\\Data\\raw\\Graduation Projects - Sheet1.xlsx\"\u001b[39m\n\u001b[32m 2\u001b[39m \n\u001b[32m----> \u001b[39m\u001b[32m3\u001b[39m df_raw = pd.read_excel(file_path)\n\u001b[32m 4\u001b[39m \n\u001b[32m 5\u001b[39m print(\u001b[33m\"Rows:\"\u001b[39m, len(df_raw))\n\u001b[32m 6\u001b[39m df_raw.tail()\n", + "\u001b[36mFile \u001b[39m\u001b[32me:\\gradution project\\.venv\\Lib\\site-packages\\pandas\\io\\excel\\_base.py:481\u001b[39m, in \u001b[36mread_excel\u001b[39m\u001b[34m(io, sheet_name, header, names, index_col, usecols, dtype, engine, converters, true_values, false_values, skiprows, nrows, na_values, keep_default_na, na_filter, verbose, parse_dates, date_format, thousands, decimal, comment, skipfooter, storage_options, dtype_backend, engine_kwargs)\u001b[39m\n\u001b[32m 479\u001b[39m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28misinstance\u001b[39m(io, ExcelFile):\n\u001b[32m 480\u001b[39m should_close = \u001b[38;5;28;01mTrue\u001b[39;00m\n\u001b[32m--> \u001b[39m\u001b[32m481\u001b[39m io = \u001b[30;43mExcelFile\u001b[39;49m\u001b[30;43m(\u001b[39;49m\n\u001b[32m 482\u001b[39m \u001b[30;43m \u001b[39;49m\u001b[30;43mio\u001b[39;49m\u001b[30;43m,\u001b[39;49m\n\u001b[32m 483\u001b[39m \u001b[30;43m \u001b[39;49m\u001b[30;43mstorage_options\u001b[39;49m\u001b[30;43m=\u001b[39;49m\u001b[30;43mstorage_options\u001b[39;49m\u001b[30;43m,\u001b[39;49m\n\u001b[32m 484\u001b[39m \u001b[30;43m \u001b[39;49m\u001b[30;43mengine\u001b[39;49m\u001b[30;43m=\u001b[39;49m\u001b[30;43mengine\u001b[39;49m\u001b[30;43m,\u001b[39;49m\n\u001b[32m 485\u001b[39m \u001b[30;43m \u001b[39;49m\u001b[30;43mengine_kwargs\u001b[39;49m\u001b[30;43m=\u001b[39;49m\u001b[30;43mengine_kwargs\u001b[39;49m\u001b[30;43m,\u001b[39;49m\n\u001b[32m 486\u001b[39m \u001b[30;43m \u001b[39;49m\u001b[30;43m)\u001b[39;49m\n\u001b[32m 487\u001b[39m \u001b[38;5;28;01melif\u001b[39;00m engine \u001b[38;5;129;01mand\u001b[39;00m engine != io.engine:\n\u001b[32m 488\u001b[39m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mValueError\u001b[39;00m(\n\u001b[32m 489\u001b[39m \u001b[33m\"\u001b[39m\u001b[33mEngine should not be specified when passing \u001b[39m\u001b[33m\"\u001b[39m\n\u001b[32m 490\u001b[39m \u001b[33m\"\u001b[39m\u001b[33man ExcelFile - ExcelFile already has the engine set\u001b[39m\u001b[33m\"\u001b[39m\n\u001b[32m 491\u001b[39m )\n", + "\u001b[36mFile \u001b[39m\u001b[32me:\\gradution project\\.venv\\Lib\\site-packages\\pandas\\io\\excel\\_base.py:1604\u001b[39m, in \u001b[36mExcelFile.__init__\u001b[39m\u001b[34m(self, path_or_buffer, engine, storage_options, engine_kwargs)\u001b[39m\n\u001b[32m 1601\u001b[39m ext = \u001b[33m\"\u001b[39m\u001b[33mxls\u001b[39m\u001b[33m\"\u001b[39m\n\u001b[32m 1603\u001b[39m \u001b[38;5;28;01mif\u001b[39;00m ext \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[32m-> \u001b[39m\u001b[32m1604\u001b[39m ext = \u001b[30;43minspect_excel_format\u001b[39;49m\u001b[30;43m(\u001b[39;49m\n\u001b[32m 1605\u001b[39m \u001b[30;43m \u001b[39;49m\u001b[30;43mcontent_or_path\u001b[39;49m\u001b[30;43m=\u001b[39;49m\u001b[30;43mpath_or_buffer\u001b[39;49m\u001b[30;43m,\u001b[39;49m\u001b[30;43m \u001b[39;49m\u001b[30;43mstorage_options\u001b[39;49m\u001b[30;43m=\u001b[39;49m\u001b[30;43mstorage_options\u001b[39;49m\n\u001b[32m 1606\u001b[39m \u001b[30;43m \u001b[39;49m\u001b[30;43m)\u001b[39;49m\n\u001b[32m 1607\u001b[39m \u001b[38;5;28;01mif\u001b[39;00m ext \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[32m 1608\u001b[39m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mValueError\u001b[39;00m(\n\u001b[32m 1609\u001b[39m \u001b[33m\"\u001b[39m\u001b[33mExcel file format cannot be determined, you must specify \u001b[39m\u001b[33m\"\u001b[39m\n\u001b[32m 1610\u001b[39m \u001b[33m\"\u001b[39m\u001b[33man engine manually.\u001b[39m\u001b[33m\"\u001b[39m\n\u001b[32m 1611\u001b[39m )\n", + "\u001b[36mFile \u001b[39m\u001b[32me:\\gradution project\\.venv\\Lib\\site-packages\\pandas\\io\\excel\\_base.py:1452\u001b[39m, in \u001b[36minspect_excel_format\u001b[39m\u001b[34m(content_or_path, storage_options)\u001b[39m\n\u001b[32m 1417\u001b[39m \u001b[38;5;28;01mdef\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34minspect_excel_format\u001b[39m(\n\u001b[32m 1418\u001b[39m content_or_path: FilePath | ReadBuffer[\u001b[38;5;28mbytes\u001b[39m],\n\u001b[32m 1419\u001b[39m storage_options: StorageOptions | \u001b[38;5;28;01mNone\u001b[39;00m = \u001b[38;5;28;01mNone\u001b[39;00m,\n\u001b[32m 1420\u001b[39m ) -> \u001b[38;5;28mstr\u001b[39m | \u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[32m 1421\u001b[39m \u001b[38;5;250m \u001b[39m\u001b[33;03m\"\"\"\u001b[39;00m\n\u001b[32m 1422\u001b[39m \u001b[33;03m Inspect the path or content of an excel file and get its format.\u001b[39;00m\n\u001b[32m 1423\u001b[39m \n\u001b[32m (...)\u001b[39m\u001b[32m 1450\u001b[39m \u001b[33;03m If resulting stream does not have an XLS signature and is not a valid zipfile.\u001b[39;00m\n\u001b[32m 1451\u001b[39m \u001b[33;03m \"\"\"\u001b[39;00m\n\u001b[32m-> \u001b[39m\u001b[32m1452\u001b[39m \u001b[38;5;28;01mwith\u001b[39;00m \u001b[30;43mget_handle\u001b[39;49m\u001b[30;43m(\u001b[39;49m\n\u001b[32m 1453\u001b[39m \u001b[30;43m \u001b[39;49m\u001b[30;43mcontent_or_path\u001b[39;49m\u001b[30;43m,\u001b[39;49m\u001b[30;43m \u001b[39;49m\u001b[30;43m\"\u001b[39;49m\u001b[30;43mrb\u001b[39;49m\u001b[30;43m\"\u001b[39;49m\u001b[30;43m,\u001b[39;49m\u001b[30;43m \u001b[39;49m\u001b[30;43mstorage_options\u001b[39;49m\u001b[30;43m=\u001b[39;49m\u001b[30;43mstorage_options\u001b[39;49m\u001b[30;43m,\u001b[39;49m\u001b[30;43m \u001b[39;49m\u001b[30;43mis_text\u001b[39;49m\u001b[30;43m=\u001b[39;49m\u001b[30;43;01mFalse\u001b[39;49;00m\n\u001b[32m 1454\u001b[39m \u001b[30;43m \u001b[39;49m\u001b[30;43m)\u001b[39;49m \u001b[38;5;28;01mas\u001b[39;00m handle:\n\u001b[32m 1455\u001b[39m stream = handle.handle\n\u001b[32m 1456\u001b[39m stream.seek(\u001b[32m0\u001b[39m)\n", + "\u001b[36mFile \u001b[39m\u001b[32me:\\gradution project\\.venv\\Lib\\site-packages\\pandas\\io\\common.py:935\u001b[39m, in \u001b[36mget_handle\u001b[39m\u001b[34m(path_or_buf, mode, encoding, compression, memory_map, is_text, errors, storage_options)\u001b[39m\n\u001b[32m 926\u001b[39m handle = \u001b[38;5;28mopen\u001b[39m(\n\u001b[32m 927\u001b[39m handle,\n\u001b[32m 928\u001b[39m ioargs.mode,\n\u001b[32m (...)\u001b[39m\u001b[32m 931\u001b[39m newline=\u001b[33m\"\u001b[39m\u001b[33m\"\u001b[39m,\n\u001b[32m 932\u001b[39m )\n\u001b[32m 933\u001b[39m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[32m 934\u001b[39m \u001b[38;5;66;03m# Binary mode\u001b[39;00m\n\u001b[32m--> \u001b[39m\u001b[32m935\u001b[39m handle = \u001b[30;43mopen\u001b[39;49m\u001b[30;43m(\u001b[39;49m\u001b[30;43mhandle\u001b[39;49m\u001b[30;43m,\u001b[39;49m\u001b[30;43m \u001b[39;49m\u001b[30;43mioargs\u001b[39;49m\u001b[30;43m.\u001b[39;49m\u001b[30;43mmode\u001b[39;49m\u001b[30;43m)\u001b[39;49m\n\u001b[32m 936\u001b[39m handles.append(handle)\n\u001b[32m 938\u001b[39m \u001b[38;5;66;03m# Convert BytesIO or file objects passed with an encoding\u001b[39;00m\n", + "\u001b[31mFileNotFoundError\u001b[39m: [Errno 2] No such file or directory: 'E:\\\\gradution project\\\\Data\\\\raw\\\\Graduation Projects - Sheet1.xlsx'" + ] + } + ], + "source": [ + "query = \"\"\"\n", + "SELECT *\n", + "FROM Projects\n", + "\"\"\"\n", + "\n", + "df_raw= pd.read_sql(query, engine)\n", "\n", - "df_raw = pd.read_excel(file_path)\n", "\n", "print(\"Rows:\", len(df_raw))\n", "df_raw.tail()" @@ -333,7 +427,7 @@ }, { "cell_type": "code", - "execution_count": 23, + "execution_count": null, "metadata": { "colab": { "base_uri": "https://localhost:8080/", @@ -352,285 +446,7 @@ "id": "CbhNr97MF3G_", "outputId": "92994227-fc55-42ee-db94-53815d8e0b49" }, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2026-05-09 03:44:02,005 | INFO | Starting preprocessing...\n", - "2026-05-09 03:44:02,126 | INFO | Removed duplicates: 7\n", - "2026-05-09 03:44:02,137 | INFO | Extracting features...\n", - "2026-05-09 03:47:15,627 | INFO | Final rows: 294\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Rows after cleaning: 294\n" - ] - }, - { - "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", - " \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", - " \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", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
idsubmitted_attitlestudent_namessupervisoryearcategorytechnologieskeywordsabstractdescriptionproblem_statementproposed_solutionobjectivesai_summaryproject_titlefull_contentclean_textword_countfeatures
289OCR_36NaTFind Missing people using Face RecognitionNaNDr. Mai Kamal2023surveillancekotlin, python flaskartificial intelligence, machine learning, dee...Our project \"Find Missed People Using Face Rec...The problem of missing persons and children is...• The absence of a dedicated digital system fo...Our project \"Find Missed People Using Face Rec...• Develop a user-friendly application accessib...This graduation project, titled \"Find Missing .... . Our project \"Find Missed People Using Face.... . our project find missed people using face ...451[missing person face, facial recognition techn...
290OCR_37NaTRemember Me Early diagnosis of Alzheimer's dis...NaNDr. Mostafa Elgendy2023medicaldart, flutter, HTML, css, js, php, mvc approac...healthcare, medical diagnosis, patient care, m...According to the WHO, around 50 million people...In this project, we aimed to collect all the t...• The absence of a dedicated digital system fo...According to the WHO, around 50 million people...• Develop a user-friendly application accessib...This graduation project, titled \"Remember Me E.... . According to the WHO, around 50 million pe.... . according to the who around 50 million peo...478[alzheimer disease ad, delay alzheimer symptom...
291OCR_40NaTMobile Based System for Traffic Monitoring and...NaNDr. Sahr fawzy2012GeneralAndroidgeneral, software system, graduation project, ...The theme of the system/application is the usa...No one can ignore the fact that traffic proble...• The absence of a dedicated digital system fo...The theme of the system/application is the usa...• Develop a user-friendly application accessib...This graduation project, titled \"Mobile Based .... . The theme of the system/application is the.... . the theme of the system/application is the...369[location based alternatives, roads provides u...
292OCR_41NaTDetecting Diseases Using Chatbot and Booking C...NaNDr. Shadia Sarhan2024medicalphp, laravel, mysql, mvc, livewire package, ui...healthcare, medical diagnosis, patient care, m...A Project aim to create application that conta...Many pcople find difficult to search for docto...• The absence of a dedicated digital system fo...A Project aim to create application that conta...• Develop a user-friendly application accessib...This graduation project, titled \"Detecting Dis.... . A Project aim to create application that c.... . a project aim to create application that c...310[doctors users chatbot, disease symptom paragr...
293OCR_46NaTElectronic SchoolNaNDr. Shaker Elsabagh2022Educationhtml, css, JavaScript, jquery, bootstrap, apie-learning, education platform, student manage...Human history is observing a very strange time...The world we live in has been through a lot of...• The absence of a dedicated digital system fo...Human history is observing a very strange time...• Achieve accurate and reliable detection/diag...This graduation project, titled \"Electronic Sc.... . Human history is observing a very strange .... . human history is observing a very strange ...511[learning electronic school, online learning p...
\n", - "
" - ], - "text/plain": [ - " id submitted_at title \\\n", - "289 OCR_36 NaT Find Missing people using Face Recognition \n", - "290 OCR_37 NaT Remember Me Early diagnosis of Alzheimer's dis... \n", - "291 OCR_40 NaT Mobile Based System for Traffic Monitoring and... \n", - "292 OCR_41 NaT Detecting Diseases Using Chatbot and Booking C... \n", - "293 OCR_46 NaT Electronic School \n", - "\n", - " student_names supervisor year category \\\n", - "289 NaN Dr. Mai Kamal 2023 surveillance \n", - "290 NaN Dr. Mostafa Elgendy 2023 medical \n", - "291 NaN Dr. Sahr fawzy 2012 General \n", - "292 NaN Dr. Shadia Sarhan 2024 medical \n", - "293 NaN Dr. Shaker Elsabagh 2022 Education \n", - "\n", - " technologies \\\n", - "289 kotlin, python flask \n", - "290 dart, flutter, HTML, css, js, php, mvc approac... \n", - "291 Android \n", - "292 php, laravel, mysql, mvc, livewire package, ui... \n", - "293 html, css, JavaScript, jquery, bootstrap, api \n", - "\n", - " keywords \\\n", - "289 artificial intelligence, machine learning, dee... \n", - "290 healthcare, medical diagnosis, patient care, m... \n", - "291 general, software system, graduation project, ... \n", - "292 healthcare, medical diagnosis, patient care, m... \n", - "293 e-learning, education platform, student manage... \n", - "\n", - " abstract \\\n", - "289 Our project \"Find Missed People Using Face Rec... \n", - "290 According to the WHO, around 50 million people... \n", - "291 The theme of the system/application is the usa... \n", - "292 A Project aim to create application that conta... \n", - "293 Human history is observing a very strange time... \n", - "\n", - " description \\\n", - "289 The problem of missing persons and children is... \n", - "290 In this project, we aimed to collect all the t... \n", - "291 No one can ignore the fact that traffic proble... \n", - "292 Many pcople find difficult to search for docto... \n", - "293 The world we live in has been through a lot of... \n", - "\n", - " problem_statement \\\n", - "289 • The absence of a dedicated digital system fo... \n", - "290 • The absence of a dedicated digital system fo... \n", - "291 • The absence of a dedicated digital system fo... \n", - "292 • The absence of a dedicated digital system fo... \n", - "293 • The absence of a dedicated digital system fo... \n", - "\n", - " proposed_solution \\\n", - "289 Our project \"Find Missed People Using Face Rec... \n", - "290 According to the WHO, around 50 million people... \n", - "291 The theme of the system/application is the usa... \n", - "292 A Project aim to create application that conta... \n", - "293 Human history is observing a very strange time... \n", - "\n", - " objectives \\\n", - "289 • Develop a user-friendly application accessib... \n", - "290 • Develop a user-friendly application accessib... \n", - "291 • Develop a user-friendly application accessib... \n", - "292 • Develop a user-friendly application accessib... \n", - "293 • Achieve accurate and reliable detection/diag... \n", - "\n", - " ai_summary project_title \\\n", - "289 This graduation project, titled \"Find Missing ... \n", - "290 This graduation project, titled \"Remember Me E... \n", - "291 This graduation project, titled \"Mobile Based ... \n", - "292 This graduation project, titled \"Detecting Dis... \n", - "293 This graduation project, titled \"Electronic Sc... \n", - "\n", - " full_content \\\n", - "289 . . Our project \"Find Missed People Using Face... \n", - "290 . . According to the WHO, around 50 million pe... \n", - "291 . . The theme of the system/application is the... \n", - "292 . . A Project aim to create application that c... \n", - "293 . . Human history is observing a very strange ... \n", - "\n", - " clean_text word_count \\\n", - "289 . . our project find missed people using face ... 451 \n", - "290 . . according to the who around 50 million peo... 478 \n", - "291 . . the theme of the system/application is the... 369 \n", - "292 . . a project aim to create application that c... 310 \n", - "293 . . human history is observing a very strange ... 511 \n", - "\n", - " features \n", - "289 [missing person face, facial recognition techn... \n", - "290 [alzheimer disease ad, delay alzheimer symptom... \n", - "291 [location based alternatives, roads provides u... \n", - "292 [doctors users chatbot, disease symptom paragr... \n", - "293 [learning electronic school, online learning p... " - ] - }, - "execution_count": 23, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "clean_df = preprocess_dataset(df_raw)\n", "\n", @@ -640,7 +456,7 @@ }, { "cell_type": "code", - "execution_count": 24, + "execution_count": null, "metadata": { "colab": { "base_uri": "https://localhost:8080/" @@ -658,16 +474,7 @@ "id": "Cddf8xCADlIr", "outputId": "89f60abf-fcf6-4d05-e53e-5c23404229c9" }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\n", - "['payment disputes service', 'secure intelligent service', 'technician recommendation module', 'maintain trust marketplace', 'escrow released technicians', 'customers qualified', 'manage account verification', 'service completion confirmed', 'workflow aims', 'feature rule based']\n" - ] - } - ], + "outputs": [], "source": [ "print(type(clean_df.loc[0, \"features\"]))\n", "print(clean_df.loc[0, \"features\"])" @@ -675,7 +482,7 @@ }, { "cell_type": "code", - "execution_count": 25, + "execution_count": null, "metadata": { "colab": { "base_uri": "https://localhost:8080/" @@ -693,34 +500,16 @@ "id": "FVpnglAmGbyU", "outputId": "347ad1f0-b83e-44f7-bdf0-7ac682fd3be6" }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "['id', 'submitted_at', 'title', 'student_names', 'supervisor', 'year', 'category', 'technologies', 'keywords', 'abstract', 'description', 'problem_statement', 'proposed_solution', 'objectives', 'ai_summary', 'project_title', 'full_content', 'clean_text', 'word_count', 'features']\n" - ] - } - ], + "outputs": [], "source": [ "print(clean_df.columns.tolist())" ] }, { "cell_type": "code", - "execution_count": 26, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "C:\\Users\\yossef\\AppData\\Local\\Temp\\ipykernel_14992\\1799785526.py:1: Pandas4Warning: For backward compatibility, 'str' dtypes are included by select_dtypes when 'object' dtype is specified. This behavior is deprecated and will be removed in a future version. Explicitly pass 'str' to `include` to select them, or to `exclude` to remove them and silence this warning.\n", - "See https://pandas.pydata.org/docs/user_guide/migration-3-strings.html#string-migration-select-dtypes for details on how to write code that works with pandas 2 and 3.\n", - " object_cols = clean_df.select_dtypes(include=\"object\").columns\n" - ] - } - ], + "outputs": [], "source": [ "object_cols = clean_df.select_dtypes(include=\"object\").columns\n", "\n", @@ -730,7 +519,7 @@ }, { "cell_type": "code", - "execution_count": 27, + "execution_count": null, "metadata": { "colab": { "base_uri": "https://localhost:8080/" @@ -748,15 +537,7 @@ "id": "viSKYOBUSy9-", "outputId": "9cd3450e-2ad3-47c9-e64f-29317d682ab3" }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Saved cleaned dataset\n" - ] - } - ], + "outputs": [], "source": [ "clean_df.to_parquet(\"Data/processed/projects_clean.parquet\", index=False)\n", "clean_df.to_csv(\"Data/processed/projects_clean.csv\", index=False)\n", @@ -766,7 +547,7 @@ }, { "cell_type": "code", - "execution_count": 28, + "execution_count": null, "metadata": { "colab": { "base_uri": "https://localhost:8080/", @@ -798,49 +579,7 @@ "id": "5i8JvSFnHdTI", "outputId": "aca927cb-4c37-4ca3-d2c2-a164597cb5b2" }, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2026-05-09 03:47:15,851 | INFO | Loading processed dataset...\n", - "2026-05-09 03:47:15,897 | INFO | Loading embedding model: all-MiniLM-L6-v2\n", - "2026-05-09 03:47:15,898 | INFO | Load pretrained SentenceTransformer: all-MiniLM-L6-v2\n", - "2026-05-09 03:47:26,117 | INFO | Use pytorch device_name: cpu\n", - "2026-05-09 03:47:26,122 | INFO | Generating embeddings for 294 projects...\n" - ] - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "b7be93be1cc5411caaca8f372cb5ce2f", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Batches: 0%| | 0/5 [00:00" - ] - }, - "execution_count": 29, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "from importlib import reload\n", "import src.similarity_model as fs\n", @@ -890,7 +618,7 @@ }, { "cell_type": "code", - "execution_count": 30, + "execution_count": null, "metadata": { "colab": { "base_uri": "https://localhost:8080/" @@ -908,18 +636,7 @@ "id": "N31P2msk757o", "outputId": "eb03780d-e519-4ea2-820c-ab701a5cee4b" }, - "outputs": [ - { - "data": { - "text/plain": [ - "" - ] - }, - "execution_count": 30, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "from importlib import reload\n", "import src.similarity_model as sim\n", @@ -929,7 +646,7 @@ }, { "cell_type": "code", - "execution_count": 31, + "execution_count": null, "metadata": { "colab": { "base_uri": "https://localhost:8080/", @@ -948,798 +665,7 @@ "id": "T77gmDkqHuTI", "outputId": "515a8d56-2978-4efa-f4d4-b1d4c631adc2" }, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2026-05-09 03:47:40,400 | INFO | Loading models and artifacts...\n", - "2026-05-09 03:47:40,403 | INFO | Loading model: all-MiniLM-L6-v2\n", - "2026-05-09 03:47:40,404 | INFO | Load pretrained SentenceTransformer: all-MiniLM-L6-v2\n", - "'(ReadTimeoutError(\"HTTPSConnectionPool(host='huggingface.co', port=443): Read timed out. (read timeout=10)\"), '(Request ID: f493475b-2e06-4bce-b590-67ca67d747aa)')' thrown while requesting HEAD https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2/resolve/main/README.md\n", - "2026-05-09 03:47:53,875 | WARNING | '(ReadTimeoutError(\"HTTPSConnectionPool(host='huggingface.co', port=443): Read timed out. (read timeout=10)\"), '(Request ID: f493475b-2e06-4bce-b590-67ca67d747aa)')' thrown while requesting HEAD https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2/resolve/main/README.md\n", - "Retrying in 1s [Retry 1/5].\n", - "2026-05-09 03:47:53,875 | WARNING | Retrying in 1s [Retry 1/5].\n", - "2026-05-09 03:47:57,229 | INFO | Use pytorch device_name: cpu\n", - "2026-05-09 03:47:57,233 | INFO | Loading FAISS index...\n", - "2026-05-09 03:47:57,242 | INFO | Loading feature model: all-MiniLM-L6-v2\n", - "2026-05-09 03:47:57,243 | INFO | Load pretrained SentenceTransformer: all-MiniLM-L6-v2\n", - "2026-05-09 03:47:59,435 | INFO | Use pytorch device_name: cpu\n", - "2026-05-09 03:47:59,438 | INFO | Loading metadata...\n", - "2026-05-09 03:47:59,466 | INFO | Preparing query...\n", - "2026-05-09 03:47:59,529 | INFO | Running semantic retrieval...\n" - ] - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "eb9136a7eafd48a5b62a4881e2984ee9", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Batches: 0%| | 0/1 [00:00\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", - " \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", - " \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", - "
project_idproject_titlesemantic_scorefeature_scorecoveragehybrid_scoreoriginality_scoreconfidence_scoreduplicate_riskshared_features_countmatched_featuresunique_query_featuresunique_candidate_featuresquery_features_usedquery_clean_text
02020.61510.56550.10.60270.49780.4922Medium1[{'feature_a': 'chatbot book recommendation', ...[library chatbot book, app library chatbot, li...[library systems egypt, collaborative reading ...[library chatbot book, app library chatbot, li...smart library app. smart library app. library ...
110.41370.60190.10.48460.59230.4262Low1[{'feature_a': 'library chatbot', 'feature_b':...[library chatbot book, app library chatbot, ch...[doctors users chatbot, help patients nearest,...[library chatbot book, app library chatbot, li...smart library app. smart library app. library ...
22250.41590.50880.10.45340.61730.3899Low1[{'feature_a': 'library chatbot', 'feature_b':...[library chatbot book, app library chatbot, ch...[websites features ai, tourists visiting egypt...[library chatbot book, app library chatbot, li...smart library app. smart library app. library ...
3290.38460.56480.10.45270.61780.3998Low1[{'feature_a': 'library chatbot', 'feature_b':...[library chatbot book, app library chatbot, ch...[reading managing computer, books intuitive in...[library chatbot book, app library chatbot, li...smart library app. smart library app. library ...
41830.33460.60190.10.43320.63340.3946Low1[{'feature_a': 'library chatbot', 'feature_b':...[library chatbot book, app library chatbot, ch...[islam mirath calculator, islamic inheritance ...[library chatbot book, app library chatbot, li...smart library app. smart library app. library ...
\n", - "" - ], - "text/plain": [ - " project_id project_title semantic_score feature_score coverage \\\n", - "0 202 0.6151 0.5655 0.1 \n", - "1 1 0.4137 0.6019 0.1 \n", - "2 225 0.4159 0.5088 0.1 \n", - "3 29 0.3846 0.5648 0.1 \n", - "4 183 0.3346 0.6019 0.1 \n", - "\n", - " hybrid_score originality_score confidence_score duplicate_risk \\\n", - "0 0.6027 0.4978 0.4922 Medium \n", - "1 0.4846 0.5923 0.4262 Low \n", - "2 0.4534 0.6173 0.3899 Low \n", - "3 0.4527 0.6178 0.3998 Low \n", - "4 0.4332 0.6334 0.3946 Low \n", - "\n", - " shared_features_count matched_features \\\n", - "0 1 [{'feature_a': 'chatbot book recommendation', ... \n", - "1 1 [{'feature_a': 'library chatbot', 'feature_b':... \n", - "2 1 [{'feature_a': 'library chatbot', 'feature_b':... \n", - "3 1 [{'feature_a': 'library chatbot', 'feature_b':... \n", - "4 1 [{'feature_a': 'library chatbot', 'feature_b':... \n", - "\n", - " unique_query_features \\\n", - "0 [library chatbot book, app library chatbot, li... \n", - "1 [library chatbot book, app library chatbot, ch... \n", - "2 [library chatbot book, app library chatbot, ch... \n", - "3 [library chatbot book, app library chatbot, ch... \n", - "4 [library chatbot book, app library chatbot, ch... \n", - "\n", - " unique_candidate_features \\\n", - "0 [library systems egypt, collaborative reading ... \n", - "1 [doctors users chatbot, help patients nearest,... \n", - "2 [websites features ai, tourists visiting egypt... \n", - "3 [reading managing computer, books intuitive in... \n", - "4 [islam mirath calculator, islamic inheritance ... \n", - "\n", - " query_features_used \\\n", - "0 [library chatbot book, app library chatbot, li... \n", - "1 [library chatbot book, app library chatbot, li... \n", - "2 [library chatbot book, app library chatbot, li... \n", - "3 [library chatbot book, app library chatbot, li... \n", - "4 [library chatbot book, app library chatbot, li... \n", - "\n", - " query_clean_text \n", - "0 smart library app. smart library app. library ... \n", - "1 smart library app. smart library app. library ... \n", - "2 smart library app. smart library app. library ... \n", - "3 smart library app. smart library app. library ... \n", - "4 smart library app. smart library app. library ... " - ] - }, - "execution_count": 31, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "final_results = find_similar_projects(\n", " title=\"Smart Library app\",\n", @@ -1753,7 +679,7 @@ }, { "cell_type": "code", - "execution_count": 32, + "execution_count": null, "metadata": { "colab": { "base_uri": "https://localhost:8080/" @@ -1771,3120 +697,7 @@ "id": "suEasutzr33J", "outputId": "dacf67d9-6725-4437-bb10-6dd8e67d03f3" }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\n", - "==============================\n", - "SELF RETRIEVAL TEST\n", - "==============================\n", - "Projects Tested : 20\n", - "Top1 Accuracy : 100.00%\n", - "==============================\n", - "\n", - "==============================\n", - "REAL QUERY TEST\n", - "==============================\n", - "\n", - "Query: AI Clinic Management System\n", - "Top Match: \n", - "Score: 0.6201\n", - "Risk: Medium\n", - "\n", - "Query: Smart Library Assistant\n", - "Top Match: \n", - "Score: 0.6127\n", - "Risk: Medium\n", - "\n", - "Query: Attendance Face Recognition\n", - "Top Match: \n", - "Score: 0.6796\n", - "Risk: Medium\n", - "\n", - "Query: E-commerce Recommendation Platform\n", - "Top Match: \n", - "Score: 0.5985\n", - "Risk: Medium\n", - "\n", - "==============================\n", - "Average Query Score: 0.6277\n", - "==============================\n", - "\n", - "==============================\n", - "FINAL MODEL STATUS\n", - "==============================\n", - "VERY GOOD ✅\n", - "Overall Score: 0.8511\n", - "==============================\n", - "\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2026-05-09 03:48:08,243 | INFO | Load pretrained SentenceTransformer: all-MiniLM-L6-v2\n", - "'(ReadTimeoutError(\"HTTPSConnectionPool(host='huggingface.co', port=443): Read timed out. (read timeout=10)\"), '(Request ID: 396bd896-b6ff-4645-a377-6950f068eab0)')' thrown while requesting HEAD https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2/resolve/main/modules.json\n", - "2026-05-09 03:48:18,553 | WARNING | '(ReadTimeoutError(\"HTTPSConnectionPool(host='huggingface.co', port=443): Read timed out. (read timeout=10)\"), '(Request ID: 396bd896-b6ff-4645-a377-6950f068eab0)')' thrown while requesting HEAD https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2/resolve/main/modules.json\n", - "Retrying in 1s [Retry 1/5].\n", - "2026-05-09 03:48:18,553 | WARNING | Retrying in 1s [Retry 1/5].\n", - "'(ReadTimeoutError(\"HTTPSConnectionPool(host='huggingface.co', port=443): Read timed out. (read timeout=10)\"), '(Request ID: 7211a374-1e2e-41f0-924c-d68ebbe389e6)')' thrown while requesting HEAD https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2/resolve/main/modules.json\n", - "2026-05-09 03:48:29,876 | WARNING | '(ReadTimeoutError(\"HTTPSConnectionPool(host='huggingface.co', port=443): Read timed out. (read timeout=10)\"), '(Request ID: 7211a374-1e2e-41f0-924c-d68ebbe389e6)')' thrown while requesting HEAD https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2/resolve/main/modules.json\n", - "Retrying in 2s [Retry 2/5].\n", - "2026-05-09 03:48:29,876 | WARNING | Retrying in 2s [Retry 2/5].\n", - "2026-05-09 03:48:42,058 | INFO | Use pytorch device_name: cpu\n", - "2026-05-09 03:48:42,064 | INFO | Loading faiss with AVX2 support.\n", - "2026-05-09 03:48:42,089 | INFO | Successfully loaded faiss with AVX2 support.\n", - "2026-05-09 03:48:42,105 | INFO | Loading metadata...\n", - "2026-05-09 03:48:42,167 | INFO | Loading models and artifacts...\n", - "2026-05-09 03:48:42,167 | INFO | Loading model: all-MiniLM-L6-v2\n", - "2026-05-09 03:48:42,167 | INFO | Load pretrained SentenceTransformer: all-MiniLM-L6-v2\n", - "2026-05-09 03:48:45,345 | INFO | Use pytorch device_name: cpu\n", - "2026-05-09 03:48:45,347 | INFO | Loading FAISS index...\n", - "2026-05-09 03:48:45,347 | INFO | Loading feature model: all-MiniLM-L6-v2\n", - "2026-05-09 03:48:45,348 | INFO | Load pretrained SentenceTransformer: all-MiniLM-L6-v2\n", - "2026-05-09 03:48:47,664 | INFO | Use pytorch device_name: cpu\n", - "2026-05-09 03:48:47,665 | INFO | Preparing query...\n", - "2026-05-09 03:48:51,925 | INFO | Running semantic retrieval...\n", - "\n", - "Batches: 0%| | 0/1 [00:00