| --- |
| title: InstaAutoApp TeamDataMavericks |
| emoji: π |
| colorFrom: red |
| colorTo: yellow |
| sdk: gradio |
| sdk_version: "4.44.1" |
| python_version: "3.11" |
| app_file: app.py |
| pinned: false |
| license: mit |
| short_description: AI-Powered Symptom Triage for 2023 Ford Bronco |
| --- |
| |
| # π Insta-AutoApp |
|
|
| **AI-Powered Symptom Triage for 2023 Ford Bronco** |
|
|
| Insta-AutoApp is a RAG-based (Retrieval-Augmented Generation) application that helps 2023 Ford Bronco owners understand warning lights and vehicle symptoms. Describe your issue in plain English and receive structured, OEM-grounded triage guidance in under 60 seconds. |
|
|
| --- |
|
|
| ## π Features |
|
|
| - **OEM-Grounded Responses**: All answers are based on the official 2023 Ford Bronco Owner's Manual |
| - **Structured Triage Output**: Every response includes Urgency Level, Likely Meaning, Next Step, and OEM Citation |
| - **Vehicle-Specific Follow-ups**: AI asks Bronco-specific clarifying questions (GOAT modes, Sasquatch package, etc.) |
| - **Safety-First Design**: Conservative defaults for brake, steering, and drivetrain issues |
| - **No Fabrication**: If the manual doesn't cover it, the app says so |
|
|
| --- |
|
|
| ## π Quick Start |
|
|
| ### Prerequisites |
|
|
| - Python 3.10+ |
| - HuggingFace API token ([get one here](https://huggingface.co/settings/tokens)) |
| - 2023 Ford Bronco Owner's Manual PDF |
|
|
| ### Installation |
|
|
| 1. **Clone or download this repository** |
|
|
| ```bash |
| git clone https://github.com/your-repo/insta-autoapp.git |
| cd insta-autoapp |
| ``` |
|
|
| 2. **Create a virtual environment (recommended)** |
|
|
| ```bash |
| python -m venv venv |
| source venv/bin/activate # On Windows: venv\Scripts\activate |
| ``` |
|
|
| 3. **Install dependencies** |
|
|
| ```bash |
| pip install -r requirements.txt |
| ``` |
|
|
| 4. **Configure environment** |
|
|
| ```bash |
| cp .env.example .env |
| # Edit .env and add your HuggingFace API token |
| ``` |
|
|
| 5. **Ingest the OEM Manual** (one-time setup) |
|
|
| ```bash |
| # Place your Bronco manual PDF in a convenient location |
| python ingest.py path/to/bronco_2023_manual.pdf |
| ``` |
|
|
| 6. **Launch the app** |
|
|
| ```bash |
| python app.py |
| ``` |
|
|
| 7. **Open in browser**: http://localhost:7860 |
|
|
| --- |
|
|
| ## π Project Structure |
|
|
| ``` |
| insta-autoapp/ |
| βββ app.py # Main Gradio application |
| βββ config.py # Configuration constants |
| βββ prompts.py # LLM system prompts |
| βββ llm_client.py # HuggingFace Inference API client |
| βββ rag_pipeline.py # FAISS retrieval logic |
| βββ ingest.py # PDF preprocessing script |
| βββ requirements.txt # Python dependencies |
| βββ .env.example # Environment template |
| βββ README.md # This file |
| βββ data/ # FAISS index (created by ingest.py) |
| βββ index.faiss |
| βββ index.pkl |
| ``` |
|
|
| --- |
|
|
| ## π§ Configuration |
|
|
| ### Environment Variables |
|
|
| | Variable | Required | Default | Description | |
| |----------|----------|---------|-------------| |
| | `HF_API_TOKEN` | Yes | - | HuggingFace API token for LLM inference | |
| | `HF_MODEL_ID` | No | `Qwen/Qwen2.5-72B-Instruct` | Model ID for inference | |
| | `TOP_K` | No | `5` | Number of chunks to retrieve | |
|
|
| ### Vehicle Profile Options |
|
|
| The app only accepts valid 2023 Ford Bronco configurations: |
|
|
| - **Trim**: Base, Big Bend, Black Diamond, Badlands, Outer Banks, Wildtrak, Raptor |
| - **Engine**: 2.3L EcoBoost, 2.7L EcoBoost |
| - **Package**: None, Sasquatch, Lux, Sasquatch + Lux |
| - **Top Type**: Soft Top, Hard Top, Modular Top |
| - **Mileage**: 0 - 300,000 |
|
|
| --- |
|
|
| ## π€ How It Works |
|
|
| ### Architecture |
|
|
| ``` |
| User Input (Symptom) |
| β |
| βΌ |
| ββββββββββββββββββββ |
| β Follow-up Gen β βββ LLM (Qwen2.5-72B) |
| β (1-2 questions) β |
| ββββββββββ¬ββββββββββ |
| β |
| βΌ |
| ββββββββββββββββββββ |
| β Combined Query β = Symptom + Vehicle Profile + Follow-up Answers |
| ββββββββββ¬ββββββββββ |
| β |
| βΌ |
| ββββββββββββββββββββ |
| β FAISS Retrieval β βββ Top-5 OEM manual chunks |
| β (all-MiniLM-L6) β |
| ββββββββββ¬ββββββββββ |
| β |
| βΌ |
| ββββββββββββββββββββ |
| β Triage Gen β βββ LLM with retrieved context |
| β (4-field output) β |
| ββββββββββ¬ββββββββββ |
| β |
| βΌ |
| Structured Response |
| + Disclaimer |
| ``` |
|
|
| ### Urgency Levels |
|
|
| | Level | Meaning | Action | |
| |-------|---------|--------| |
| | **Safe** | Cosmetic or informational | No action required | |
| | **Monitor** | Non-critical issue | Check within 7 days if persists | |
| | **Urgent** | Needs attention | Schedule service, limit driving | |
| | **Do Not Drive** | Safety-critical | Stop immediately, seek assistance | |
|
|
| --- |
|
|
| ## π Deployment to HuggingFace Spaces |
|
|
| 1. **Create a new Space** at https://huggingface.co/new-space |
| - Select "Gradio" as the SDK |
| - Choose a name (e.g., `insta-autoapp`) |
|
|
| 2. **Clone the Space repository** |
|
|
| ```bash |
| git clone https://huggingface.co/spaces/YOUR_USERNAME/insta-autoapp |
| cd insta-autoapp |
| ``` |
|
|
| 3. **Copy all files** from this project into the Space folder |
|
|
| 4. **Add your FAISS index** (from running `ingest.py` locally) |
| - Copy `data/index.faiss` and `data/index.pkl` to the Space |
|
|
| 5. **Set Space Secrets** |
| - Go to Settings β Variables and secrets |
| - Add `HF_API_TOKEN` as a secret |
|
|
| 6. **Push to deploy** |
|
|
| ```bash |
| git add . |
| git commit -m "Initial deployment" |
| git push |
| ``` |
|
|
| --- |
|
|
| ## β οΈ Limitations |
|
|
| - **Single Vehicle**: V1 supports only 2023 Ford Bronco. Multi-vehicle support planned for V2. |
| - **Text Only**: No image/photo upload. No voice input. |
| - **Ephemeral Sessions**: Vehicle profile and history are not saved across sessions. |
| - **Table Extraction**: Table-heavy manual sections (fluid specs, fuse layouts) may have degraded extraction quality. |
| - **Not a Diagnosis**: This is triage guidance, not professional mechanical advice. |
|
|
| --- |
|
|
| ## π Privacy |
|
|
| - **No PII Collected**: No names, emails, or personal data stored |
| - **Ephemeral Sessions**: All session data is lost when browser closes |
| - **Local Data**: FAISS index stored locally, not transmitted |
| - **API Calls**: Only symptom text is sent to HuggingFace API for inference |
|
|
| --- |
|
|
| ## π License |
|
|
| MIT License - See LICENSE file for details. |
|
|
| --- |
|
|
| ## π₯ Team |
|
|
| **Data Mavericks** - ANLY 601 Advanced Coding for Business |
| Texas A&M University, Mays Business School |
|
|
| - Nasser Chaudhry |
| - Miriam Camacho |
| - Neil Driscoll |
|
|
| --- |
|
|
| ## π Acknowledgments |
|
|
| - OEM Manual Source: [CarManualsOnline.info](https://carmanualsonline.info) |
| - Embedding Model: [sentence-transformers/all-MiniLM-L6-v2](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2) |
| - LLM: [Qwen/Qwen2.5-72B-Instruct](https://huggingface.co/Qwen/Qwen2.5-72B-Instruct) |
|
|