demoprep / README.md
mikeboone's picture
fix: upgrade to gradio 4.44.1 which fixes TypeError in gradio_client
253ed33
---
title: ThoughtSpot Demo Builder
emoji: πŸš€
colorFrom: blue
colorTo: purple
sdk: gradio
sdk_version: "4.44.1"
app_file: app.py
pinned: false
license: mit
python_version: "3.11"
---
# Demo Wire - AI-Powered Demo Builder
A powerful Gradio-based application that automatically generates and deploys complete demo environments for ThoughtSpot, including Snowflake schemas, data population, and semantic model creation.
> **Deployed on Hugging Face Spaces**: This app can be deployed to HF Spaces for easy access. See [DEPLOYMENT.md](DEPLOYMENT.md) for setup instructions.
## πŸš€ Features
- **AI-Powered Research**: Automatically researches companies and industries using LLM
- **Schema Generation**: Creates optimized Snowflake DDL based on business context
- **Data Population**: Generates realistic demo data with strategic outliers
- **ThoughtSpot Integration**: Deploys connections, tables, and semantic models
- **Interactive UI**: Clean, intuitive Gradio interface with real-time progress updates
## πŸ› οΈ Tech Stack
- **Frontend**: Gradio (Python web UI)
- **Backend**: Python 3.12+
- **Database**: Snowflake
- **Analytics**: ThoughtSpot
- **AI**: OpenAI GPT models
- **Data Generation**: Faker library
## πŸ“‹ Prerequisites
- Python 3.12+
- Snowflake account with appropriate permissions
- ThoughtSpot Cloud account
- OpenAI API key
## πŸš€ Quick Start
1. **Clone the repository**
```bash
git clone https://github.com/yourusername/demo-wire.git
cd demo-wire
```
2. **Set up virtual environment**
```bash
python -m venv demo_wire
source demo_wire/bin/activate # On Windows: demo_wire\Scripts\activate
```
3. **Install dependencies**
```bash
pip install -r requirements.txt
```
4. **Configure environment variables**
```bash
cp .env.example .env
# Edit .env with your credentials
```
5. **Run the application**
```bash
python demo_prep.py
```
6. **Open your browser**
Navigate to `http://localhost:7860`
## βš™οΈ Configuration
Create a `.env` file with the following variables:
```env
# OpenAI
OPENAI_API_KEY=your_openai_api_key
# Snowflake
SNOWFLAKE_USER=your_username
SNOWFLAKE_PASSWORD=your_password
SNOWFLAKE_ACCOUNT=your_account
SNOWFLAKE_WAREHOUSE=your_warehouse
SNOWFLAKE_DATABASE=your_database
SNOWFLAKE_SCHEMA=your_schema
# ThoughtSpot
THOUGHTSPOT_URL=your_thoughtspot_url
THOUGHTSPOT_USERNAME=your_username
THOUGHTSPOT_PASSWORD=your_password
```
## 🎯 Usage
1. **Enter Company Information**: Company name, URL, and industry
2. **Start Research**: AI analyzes the company and industry
3. **Create DDL**: Generate optimized Snowflake schema
4. **Generate Data**: Create realistic demo data with outliers
5. **Deploy**: Deploy to Snowflake and ThoughtSpot
## πŸ“ Project Structure
```
demo-wire/
β”œβ”€β”€ demo_prep.py # Main Gradio application
β”œβ”€β”€ schema_utils.py # Schema parsing and generation utilities
β”œβ”€β”€ thoughtspot_deployer.py # ThoughtSpot deployment logic
β”œβ”€β”€ snowflake_auth.py # Snowflake authentication
β”œβ”€β”€ demo_personas.py # Demo persona configurations
β”œβ”€β”€ prompts.py # LLM prompt templates
β”œβ”€β”€ requirements.txt # Python dependencies
β”œβ”€β”€ docs/ # Documentation
β”œβ”€β”€ tests/ # Test files
└── results/ # Generated demo results
```
## πŸ§ͺ Testing
Run the test suite:
```bash
python -m pytest tests/
```
## 🀝 Contributing
1. Fork the repository
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
3. Commit your changes (`git commit -m 'Add amazing feature'`)
4. Push to the branch (`git push origin feature/amazing-feature`)
5. Open a Pull Request
## πŸ“„ License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
## πŸ™ Acknowledgments
- ThoughtSpot for the analytics platform
- Snowflake for the data warehouse
- OpenAI for the AI capabilities
- Gradio for the web interface
## πŸ“š Development Notes
Development notes and sprint planning are stored in `dev_notes/` (not committed to version control).
## πŸ“ž Support
For support, email support@demo-wire.com or create an issue in this repository.
---
**Built with ❀️ for the ThoughtSpot community**