{ "cells": [ { "cell_type": "code", "execution_count": 6, "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 35 }, "executionInfo": { "elapsed": 49, "status": "ok", "timestamp": 1777121871809, "user": { "displayName": "yossef assem", "userId": "00346058032754430335" }, "user_tz": -180 }, "id": "C89EBjEsx9Gq", "outputId": "e76f8c9c-cdcf-4fc7-94b5-4e8a30009518" }, "outputs": [ { "data": { "text/plain": [ "'e:\\\\gradution project'" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "\n", "import os\n", "os.getcwd()\n", "os.chdir(\"/gradution project\")\n", "os.getcwd()" ] }, { "cell_type": "code", "execution_count": 7, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "executionInfo": { "elapsed": 11569, "status": "ok", "timestamp": 1777121884875, "user": { "displayName": "yossef assem", "userId": "00346058032754430335" }, "user_tz": -180 }, "id": "Eel6SUFWvNMW", "outputId": "10ac3316-9b05-44f4-81b8-4ba3ff26cc99" }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "All modules imported successfully\n" ] } ], "source": [ "import pandas as pd\n", "import numpy as np\n", "from tqdm.notebook import tqdm\n", "\n", "from src.similarity_model import preprocess_dataset\n", "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": 9, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "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": [ "
| \n", " | TABLE_NAME | \n", "
|---|---|
| 0 | \n", "Teams | \n", "
| 1 | \n", "ChatRooms | \n", "
| 2 | \n", "JoinRequests | \n", "
| 3 | \n", "Projects | \n", "
| 4 | \n", "TeamMembers | \n", "
| 5 | \n", "ChatMessages | \n", "
| 6 | \n", "Feedbacks | \n", "
| 7 | \n", "OriginalityReports | \n", "
| 8 | \n", "ProjectAttachments | \n", "
| 9 | \n", "ProjectTechnologies | \n", "
| 10 | \n", "VectorEmbeddings | \n", "
| 11 | \n", "ChatMessageAttachments | \n", "
| 12 | \n", "SimilarProjects | \n", "
| 13 | \n", "AuditLogs | \n", "
| 14 | \n", "AcademicYears | \n", "
| 15 | \n", "Schema | \n", "
| 16 | \n", "Job | \n", "
| 17 | \n", "State | \n", "
| 18 | \n", "JobParameter | \n", "
| 19 | \n", "JobQueue | \n", "
| 20 | \n", "database_firewall_rules | \n", "
| 21 | \n", "Server | \n", "
| 22 | \n", "List | \n", "
| 23 | \n", "Set | \n", "
| 24 | \n", "Counter | \n", "
| 25 | \n", "Hash | \n", "
| 26 | \n", "AggregatedCounter | \n", "
| 27 | \n", "__EFMigrationsHistory | \n", "
| 28 | \n", "Departments | \n", "
| 29 | \n", "Skills_Backup | \n", "
| 30 | \n", "Projects_Backup | \n", "
| 31 | \n", "Domains | \n", "
| 32 | \n", "PreProcessed_Projects | \n", "
| 33 | \n", "Skills | \n", "
| 34 | \n", "Technologies | \n", "
| 35 | \n", "Users | \n", "
| 36 | \n", "Notifications | \n", "
| 37 | \n", "StudentSkills | \n", "