Spaces:
Configuration error
Configuration error
| # Dash + Hugging Face Demo | |
| This is a demo application showcasing how to use Dash with Hugging Face models deployed on Hugging Face Spaces using Docker. | |
| ## Features | |
| - **Sentiment Analysis**: Analyze the sentiment of text using a pre-trained model | |
| - **Text Generation**: Generate text based on prompts using GPT-2 | |
| - **Interactive Visualizations**: View sentiment analysis results with Plotly charts | |
| - **Responsive Design**: Bootstrap-based UI that works on all devices | |
| ## Models Used | |
| - Sentiment Analysis: `cardiffnlp/twitter-roberta-base-sentiment-latest` | |
| - Text Generation: `gpt2` | |
| ## Local Development | |
| 1. Clone this repository | |
| 2. Install dependencies: `pip install -r requirements.txt` | |
| 3. Run the app: `python app.py` | |
| 4. Open your browser to `http://localhost:7860` | |
| ## Deployment on Hugging Face Spaces | |
| This app is configured to run on Hugging Face Spaces using Docker: | |
| 1. The Dockerfile sets up the Python environment | |
| 2. Port 7860 is exposed (required by HF Spaces) | |
| 3. Models are loaded automatically when the container starts | |
| ## File Structure | |
| ``` | |
| βββ app.py # Main Dash application | |
| βββ requirements.txt # Python dependencies | |
| βββ Dockerfile # Docker configuration | |
| βββ README.md # This file | |
| ``` | |
| ## Configuration | |
| The app automatically detects when running on Hugging Face Spaces and configures itself accordingly. No additional setup is required. |