Spaces:
Sleeping
Sleeping
Commit History
-
Refactor: Polish project for review
This commit includes final cleanup and usability improvements before sending the project for review. - **Dependency Cleanup**: Removed unused dependencies (`langchain`, `transformers`) from `pyproject.toml`. This simplifies the project environment and reduces the installation footprint. - **Improved Setup and Demo Experience**: - The error message for a missing `FOT_GOOGLE_API_KEY` is now more helpful, providing an example `.env` format to streamline local setup. - Modified the PoC notebook's setup cell to install only essential dependencies (`sentence-transformers`, `faiss-cpu`, `google-generativeai`) directly. This resolves critical dependency conflicts with Google Colab's pre-installed packages, ensuring the demo notebook runs reliably for any user.d9d86e9 -
fix: Defer IPython import to prevent deployment error
- Moves the `IPython` import into the notebook-only helper function in `utils.py`. - This lazy import resolves the `ModuleNotFoundError` on Hugging Face by not loading dev dependencies in the production server. - Applies standard `ruff` formatting fixes.009e36a -
style: Format code and fix linter warnings
Applied `ruff format` to the entire codebase for consistency. Also fixed all outstanding Pyright and Ruff linter warnings: - Ignored warnings for correct but "private" imports (gradio, genai). - Added a check for the API key to fix a potential `None` type error. - Suppressed E402 import errors in the build script where required.280d562 -
refactor(config): Centralize all application configuration
This commit introduces a major architectural improvement by refactoring the entire application to use a single source of truth for configuration (`src/fot_recommender/config.py`). Previously, configuration variables like file paths, model parameters, and secrets were scattered across multiple files (`app.py`, `rag_pipeline.py`, `main.py`), making the system brittle and difficult to maintain. This change establishes a clean separation of concerns, where the application logic is decoupled from its configuration. This makes experimentation significantly easier (e.g., changing a model name or similarity score in one place) and lays the foundation for supporting different deployment environments (dev, prod) in the future. Key Changes: - **`config.py` is now the Central Hub:** - Consolidates all file paths for the knowledge base, FAISS index, and citations. - Defines all RAG pipeline parameters (embedding/generative model names, `k` value, similarity score). - Centralizes the loadin…23ef32a
-
feat(ui): Overhaul Gradio app for interactivity and evaluation
Transforms the basic Gradio interface into a polished, feature-rich web application designed for demonstration and evaluation. The new UI provides a significantly improved user experience with interactive examples and adds robust features for capturing and analyzing the RAG pipeline's output. This work completes the transition from a back-end proof-of-concept to a user-facing demo. Key Changes: - **Gradio App Overhaul (`app.py`):** - Rewrote the UI using `gr.Blocks` for a custom two-column layout. - Added an "Example Scenarios" section with radio buttons to quickly populate the form with pre-defined student narratives. - Implemented an "Evaluation Data" accordion that displays the full RAG output (inputs, retrieval results, LLM output) in a JSON viewer. - Added a "Download JSON" button to allow users to save the complete evaluation data for offline analysis. - Refactored the API call to be a generator (`yield`), enabling progressive updates like "Processing..." messages an…abf3963 -
feat: Rework PoC notebook for clarity and user experience
Refactors the PoC notebook to create a clear, step-by-step narrative for a non-technical audience. The new structure guides the user from the initial problem (the student profile) to the final, synthesized recommendation. Key improvements include: - A universal, robust setup cell that automatically clones the repo and uses `sys.executable` for reliable package installation. - Proactively silences common warnings (`TqdmWarning`, `TOKENIZERS_PARALLELISM`) for a clean, error-free execution. - Simplifies technical concepts using analogies and focuses the narrative on the value delivered to educators. - Replaces the final interactive prompt with a direct call-to-action, linking to the live Hugging Face Spaces demo for a more polished and interactive conclusion.10a77fa
-
feat(deploy): Implement and deploy live Gradio API
This commit introduces a fully functional, live API for the FOT Recommender, deployed on Hugging Face Spaces using Gradio. It marks a major architectural shift from local scripts to a production-oriented, interactive web application. This provides a frictionless "it just works" experience for reviewers, demonstrating the entire RAG pipeline from a simple web interface without requiring them to handle API keys or run code locally. Key architectural changes and fixes include: - **Gradio API:** A new `app.py` serves the model, handling user input and displaying synthesized, formatted recommendations. - **Offline Artifact Generation:** The build process was refactored to pre-compute and save the `faiss_index.bin` vector database. This ensures the live application has a fast startup time and is highly efficient. - **Secure Configuration:** All secrets (Google API Key, Demo Password) are now read from the secure Hugging Face environment, removing them from source code. - **Deployment Stabi…8bfb8e4 -
feat(notebook): Add PoC notebook for RAG demonstration
This commit introduces the primary technical deliverable: a functional, interactive Proof-of-Concept (PoC) in a Google Colab notebook. The notebook () demonstrates the functionality of the Freshman On-Track Intervention Recommender. It guides the user through the entire process: - Setting up the local environment. - Loading the final, semantically chunked knowledge base. - Initializing the embedding model and FAISS vector database. - Accepting a user's free-text query about a student's challenges. - Performing a semantic search and displaying the top 3 recommendations. Key Changes: - **Added PoC Notebook**: Created to serve as the interactive demonstration of the RAG system. - **Created Display Utilities**: Introduced a new module with a helper function. This formats the raw search results into a clean, human-readable output, making the recommendations clear and actionable within the notebook. - **Updated Dependencies**: Added and to the dependencies in to ensure the project's…1550049