mattritchey commited on
Commit
f423c92
Β·
verified Β·
1 Parent(s): 703e2f1

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +43 -10
README.md CHANGED
@@ -1,10 +1,43 @@
1
- ---
2
- title: Docker Dash
3
- emoji: πŸ‘
4
- colorFrom: pink
5
- colorTo: yellow
6
- sdk: docker
7
- pinned: false
8
- ---
9
-
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Dash + Hugging Face Demo
2
+
3
+ This is a demo application showcasing how to use Dash with Hugging Face models deployed on Hugging Face Spaces using Docker.
4
+
5
+ ## Features
6
+
7
+ - **Sentiment Analysis**: Analyze the sentiment of text using a pre-trained model
8
+ - **Text Generation**: Generate text based on prompts using GPT-2
9
+ - **Interactive Visualizations**: View sentiment analysis results with Plotly charts
10
+ - **Responsive Design**: Bootstrap-based UI that works on all devices
11
+
12
+ ## Models Used
13
+
14
+ - Sentiment Analysis: `cardiffnlp/twitter-roberta-base-sentiment-latest`
15
+ - Text Generation: `gpt2`
16
+
17
+ ## Local Development
18
+
19
+ 1. Clone this repository
20
+ 2. Install dependencies: `pip install -r requirements.txt`
21
+ 3. Run the app: `python app.py`
22
+ 4. Open your browser to `http://localhost:7860`
23
+
24
+ ## Deployment on Hugging Face Spaces
25
+
26
+ This app is configured to run on Hugging Face Spaces using Docker:
27
+
28
+ 1. The Dockerfile sets up the Python environment
29
+ 2. Port 7860 is exposed (required by HF Spaces)
30
+ 3. Models are loaded automatically when the container starts
31
+
32
+ ## File Structure
33
+
34
+ ```
35
+ β”œβ”€β”€ app.py # Main Dash application
36
+ β”œβ”€β”€ requirements.txt # Python dependencies
37
+ β”œβ”€β”€ Dockerfile # Docker configuration
38
+ └── README.md # This file
39
+ ```
40
+
41
+ ## Configuration
42
+
43
+ The app automatically detects when running on Hugging Face Spaces and configures itself accordingly. No additional setup is required.