{ "cells": [ { "cell_type": "markdown", "metadata": { "id": "202XSRRtMuES" }, "source": [ "# SectorSync: AI-Powered Stock Recommendation App\n", "This notebook covers the final project implementation, including dataset loading, embeddings, recommendation engine, Generative AI sales pitches, interactive Gradio web application, and comprehensive data science accuracy investigations.\n" ], "id": "202XSRRtMuES" }, { "cell_type": "markdown", "metadata": { "id": "t8eiNJl2MuEU" }, "source": [ "# part 1\n", "Installing all essential machine learning and data processing libraries required to power the AI recommendation engine, execute the benchmarks, and build the interactive front-end user interface.\n", "\n" ], "id": "t8eiNJl2MuEU" }, { "cell_type": "code", "execution_count": 1, "metadata": { "id": "yWjG5qKXMuEV", "colab": { "base_uri": "https://localhost:8080/" }, "outputId": "5592e2c5-42c7-4379-cb60-30044c8e2635" }, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m18.5/18.5 MB\u001b[0m \u001b[31m21.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", "\u001b[?25h" ] } ], "source": [ "!pip install -q datasets sentence-transformers faiss-cpu gradio transformers torch scikit-learn matplotlib numpy pandas\n" ], "id": "yWjG5qKXMuEV" }, { "cell_type": "markdown", "metadata": { "id": "vYVPSM0dMuEV" }, "source": [ "# part 2\n", "Downloading the finalized dataset directly from the Hugging Face cloud into a Pandas DataFrame to prove the external data pipeline is universally accessible and perform a quick visual sanity check.\n", "\n" ], "id": "vYVPSM0dMuEV" }, { "cell_type": "code", "execution_count": 2, "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 705, "referenced_widgets": [ "5d6c9244400c4bec9d145f1f141b3e8e", "3c33f0fa796a47428e04dc6937c53360", "2c227c2cd6eb424288840ba9790c47f9", "f63196393fcc49cbb1d14eea15d95af6", "9f815012a9f64752933cf53df3729f6a", "513447ad98494e388717ab80c6aa50cf", "a5f601033569459f80bb730f5ee9995b", "2f2d5b9231fb45aa9e12828a059f7f3c", "6890e16eaca24c6eaa209ce9dbeef600", "0a5be6229aab426abebeeef6ef9f85f8", "3e026f82d88e4cafb899ff8bf828eb94", "44c3e08cd9434aaaa53b9a6b387f7655", "6987379af67e4a3f936c23ad5a4e2030", "8454220dae794469908460772028ce64", "21d4d4bbc57b48338a614b86acc7fa51", "6227bb2d4dd541218076b38e65879361", "40fa7f1dea7c41aeabd6b29ae052e0e7", "ddea1e08531e4dd487ffd71b4de9e320", "df33152eb4104bdc9bb3ad9728aec3f4", "ebc3517ccca9433aabfe9acd2f5d7b24", "055927912daf4d3aafdaa634411c82b3", "1c8a0c2c54ea49a6b358db7df2f14e1d", "5c4b1ee681bb4157b73cde30972f70db", "0fdab98d5e6d4f8fb7585ebf32619adb", "60398accdaf34a72ad1ee0b86aa6f068", "7e7a90d0db71438897767d8be74fc471", "49709dcc975f462797a06d7abbc27928", "b1a6d3a3f72943eb9e43fdb245d2f3ec", "61242f8464494bf7b477bd0466bf7386", "d0e752fe2f974650ac469b12e37b41b0", "c6d79a87935544238071ce6848420eae", "b66bf50993d54d568d42a6544aa6fb32", "e8d643036edc4a68b19d84f305828f22" ] }, "id": "zi6083WcMuEV", "outputId": "7315a73e-17a4-4afd-c2ad-943adee8525a" }, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "Downloading dataset from Hugging Face...\n" ] }, { "output_type": "display_data", "data": { "text/plain": [ "README.md: 0%| | 0.00/9.57k [00:00, ?B/s]" ], "application/vnd.jupyter.widget-view+json": { "version_major": 2, "version_minor": 0, "model_id": "5d6c9244400c4bec9d145f1f141b3e8e" } }, "metadata": {} }, { "output_type": "stream", "name": "stderr", "text": [ "Warning: You are sending unauthenticated requests to the HF Hub. Please set a HF_TOKEN to enable higher rate limits and faster downloads.\n", "WARNING:huggingface_hub.utils._http:Warning: You are sending unauthenticated requests to the HF Hub. Please set a HF_TOKEN to enable higher rate limits and faster downloads.\n" ] }, { "output_type": "display_data", "data": { "text/plain": [ "12000_companies_FINAL.csv: 0%| | 0.00/5.99M [00:00, ?B/s]" ], "application/vnd.jupyter.widget-view+json": { "version_major": 2, "version_minor": 0, "model_id": "44c3e08cd9434aaaa53b9a6b387f7655" } }, "metadata": {} }, { "output_type": "display_data", "data": { "text/plain": [ "Generating train split: 0%| | 0/11615 [00:00, ? examples/s]" ], "application/vnd.jupyter.widget-view+json": { "version_major": 2, "version_minor": 0, "model_id": "5c4b1ee681bb4157b73cde30972f70db" } }, "metadata": {} }, { "output_type": "stream", "name": "stdout", "text": [ "✅ Successfully loaded 11615 unique companies from the cloud!\n" ] }, { "output_type": "execute_result", "data": { "text/plain": [ " company_name ticker sector \\\n", "0 QuantumShift AI QSHF Technology \n", "1 VitaGen Therapeutics VGEN Healthcare \n", "2 EcoCycle Materials ECCM Industrials \n", "3 NovaGrid Energy NVGR Energy \n", "4 OmniFinance Group OMFG Financials \n", "\n", " theme \\\n", "0 AI & Machine Learning \n", "1 Gene Therapy & Biotechnology \n", "2 Sustainable Materials Manufacturing \n", "3 Renewable Energy & Smart Grid \n", "4 Fintech & Digital Banking \n", "\n", " description \n", "0 QuantumShift AI develops cutting-edge artifici... \n", "1 VitaGen Therapeutics is a clinical-stage biote... \n", "2 EcoCycle Materials specializes in the developm... \n", "3 NovaGrid Energy develops and operates next-gen... \n", "4 OmniFinance Group is a leading fintech company... " ], "text/html": [ "\n", "
| \n", " | company_name | \n", "ticker | \n", "sector | \n", "theme | \n", "description | \n", "
|---|---|---|---|---|---|
| 0 | \n", "QuantumShift AI | \n", "QSHF | \n", "Technology | \n", "AI & Machine Learning | \n", "QuantumShift AI develops cutting-edge artifici... | \n", "
| 1 | \n", "VitaGen Therapeutics | \n", "VGEN | \n", "Healthcare | \n", "Gene Therapy & Biotechnology | \n", "VitaGen Therapeutics is a clinical-stage biote... | \n", "
| 2 | \n", "EcoCycle Materials | \n", "ECCM | \n", "Industrials | \n", "Sustainable Materials Manufacturing | \n", "EcoCycle Materials specializes in the developm... | \n", "
| 3 | \n", "NovaGrid Energy | \n", "NVGR | \n", "Energy | \n", "Renewable Energy & Smart Grid | \n", "NovaGrid Energy develops and operates next-gen... | \n", "
| 4 | \n", "OmniFinance Group | \n", "OMFG | \n", "Financials | \n", "Fintech & Digital Banking | \n", "OmniFinance Group is a leading fintech company... | \n", "