Spaces:
Sleeping
Sleeping
File size: 4,182 Bytes
afb1abf f0c6b6b afb1abf 702fcc8 afb1abf f0c6b6b afb1abf f0c6b6b 998af39 f0c6b6b 998af39 f0c6b6b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
---
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* |