FindHugForPMwithKey / README.md
ClaCe's picture
Update README.md
702fcc8 verified
---
title: ML Use Cases RAG Assistant (BYOK)
emoji: 🧠
colorFrom: blue
colorTo: purple
sdk: gradio
sdk_version: 5.44.0
app_file: app.py
pinned: false
license: mit
---
# ML/AI Use Cases RAG Assistant (Bring Your Own Key)
An AI-powered assistant that provides business advice based on real ML/AI implementations from 60+ companies with 400+ use cases. This app uses Retrieval-Augmented Generation (RAG) to find relevant company examples and provides actionable recommendations.
**πŸ”‘ Bring Your Own Key:** This version requires users to provide their own HuggingFace API key, ensuring zero cost to the space owner while maintaining full functionality.
## Features
- **πŸ”‘ BYOK (Bring Your Own Key)**: Use your own HuggingFace API key for secure, cost-effective access
- **πŸ” Semantic Search**: Find relevant ML/AI use cases from a comprehensive database
- **πŸ€– AI-Powered Advice**: Get personalized recommendations using HuggingFace Inference API
- **πŸ“Š Model Recommendations**: Discover fine-tuned and foundation models for your specific use case
- **🏒 Real Company Examples**: Learn from actual implementations across various industries
- **πŸ”’ Privacy-First**: Only embeddings are used - no raw company data is exposed
- **πŸ’° Zero Cost to Owner**: No API costs for the space owner - users bring their own keys
## How It Works
1. **πŸ”‘ API Key Setup**: Provide your HuggingFace API key for secure access
2. **πŸ“ Query Processing**: Your business problem is analyzed and converted to embeddings
3. **πŸ” Semantic Search**: The system searches through 400+ pre-processed ML use cases
4. **πŸ“š Context Building**: Relevant company examples are selected as context
5. **πŸ€– AI Generation**: Your API key powers the language model to generate tailored advice
6. **πŸ“Š Model Matching**: HuggingFace API provides relevant model recommendations using your key
## Technology Stack
- **Backend**: FastAPI with async support and BYOK architecture
- **Vector Database**: ChromaDB for semantic search
- **Embeddings**: Sentence Transformers (all-MiniLM-L6-v2)
- **Language Model**: HuggingFace Inference API (Gemma 2 2B with fallbacks)
- **Frontend**: Modern HTML/CSS/JavaScript with Tailwind CSS
- **Security**: User API keys never stored, used only for requests
## Security & Privacy
- **πŸ” API Key Security**: Your API key is never stored permanently, only used for requests
- **πŸ“Š No Raw Data**: Only vector embeddings and metadata are stored
- **🏒 Company Privacy**: Original datasets remain private
- **πŸ›‘οΈ Secure Processing**: All processing happens within the secure HuggingFace environment
- **πŸ’Ύ Local Storage**: API keys stored locally in your browser for convenience
## Getting Started
### 1. Get Your HuggingFace API Key
1. Visit [HuggingFace Settings](https://huggingface.co/settings/tokens)
2. Click "Create new token"
3. Select "Read" access (sufficient for this app)
4. Copy your token (starts with `hf_`)
### 2. Use the Assistant
1. Enter your API key in the secure input field
2. Describe your business problem in natural language:
- "I want to reduce customer churn in my SaaS business"
- "How can I implement fraud detection for my e-commerce platform"
- "What ML approach works best for demand forecasting in retail"
### 3. Get AI-Powered Results
- **Solution Approach**: Detailed technical recommendations
- **Company Examples**: Real implementations from similar businesses
- **Model Recommendations**: Specific HuggingFace models for your use case
## Model Information
This space uses pre-computed ChromaDB embeddings generated from a curated dataset of ML/AI use cases. The language model runs efficiently on CPU with fallback options for reliability.
## Requirements & Limitations
### Requirements
- Valid HuggingFace API key (free to obtain)
- Internet connection for API calls
### Limitations
- Responses are generated based on training data patterns
- Model recommendations are sourced from HuggingFace Hub API
- Processing time may vary based on query complexity and API response times
- API rate limits apply based on your HuggingFace account tier
---
*Built with ❀️ using HuggingFace Spaces*