AntDX316 commited on
Commit
d63d60b
Β·
1 Parent(s): 6ae4ab5
Files changed (2) hide show
  1. HF-docker2 +0 -1
  2. README.md +197 -0
HF-docker2 DELETED
@@ -1 +0,0 @@
1
- Subproject commit aab4ecc9cd1b5c21873028277e4e865dcb41ddde
 
 
README.md CHANGED
@@ -10,3 +10,200 @@ pinned: false
10
  ---
11
 
12
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  ---
11
 
12
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
13
+
14
+ # HF-Streamlit
15
+
16
+ HF-Streamlit is an interactive data visualization dashboard built with Python and Streamlit that demonstrates the power of modern web-based analytics.
17
+
18
+ The app generates dynamic time series data and presents it through customizable charts with multiple color themes, real-time filtering capabilities, and exportable datasets.
19
+
20
+ Users can explore data through an intuitive interface featuring adjustable parameters (data size, chart height, color schemes), filter by categories and value ranges, view key performance metrics, and download filtered results as CSV files.
21
+
22
+ Perfect for showcasing data science capabilities or as a starting template for building more complex analytical dashboards, this app combines clean UI design with powerful data manipulation features in just a few lines of Python code.
23
+
24
+ ## πŸ“Š Features
25
+
26
+ - **Interactive Data Visualization**: Dynamic time series charts with customizable color themes
27
+ - **Real-time Data Filtering**: Filter datasets by categories and value ranges
28
+ - **Data Export**: Download filtered data as CSV files
29
+ - **Metrics Dashboard**: Display key performance indicators and statistics
30
+ - **Responsive Design**: Clean, modern UI with custom CSS styling
31
+ - **Multi-tab Interface**: Organized content across Chart, Data Explorer, and About tabs
32
+
33
+ ## πŸš€ Quick Start
34
+
35
+ ### Prerequisites
36
+
37
+ - Python 3.9 or higher
38
+ - pip package manager
39
+
40
+ ### Local Installation
41
+
42
+ 1. Clone the repository:
43
+ ```bash
44
+ git clone <repository-url>
45
+ cd HF-Streamlit
46
+ ```
47
+
48
+ 2. Install dependencies:
49
+ ```bash
50
+ pip install -r requirements.txt
51
+ ```
52
+
53
+ 3. Run the application:
54
+ ```bash
55
+ streamlit run app.py
56
+ ```
57
+
58
+ The app will be available at `http://localhost:8501`
59
+
60
+ ## 🐳 Docker Deployment
61
+
62
+ ### Build and Run with Docker
63
+
64
+ 1. Build the Docker image:
65
+ ```bash
66
+ docker build -t hf-streamlit .
67
+ ```
68
+
69
+ 2. Run the container:
70
+ ```bash
71
+ docker run -p 7860:7860 hf-streamlit
72
+ ```
73
+
74
+ The app will be available at `http://localhost:7860`
75
+
76
+ ### Docker Hub (if applicable)
77
+
78
+ ```bash
79
+ docker pull <your-dockerhub-username>/hf-streamlit
80
+ docker run -p 7860:7860 <your-dockerhub-username>/hf-streamlit
81
+ ```
82
+
83
+ ## πŸ› οΈ Dependencies
84
+
85
+ - **streamlit**: Web app framework for Python
86
+ - **pandas**: Data manipulation and analysis
87
+ - **numpy**: Numerical computing
88
+ - **plotly**: Interactive plotting library
89
+
90
+ ## πŸ“± Application Structure
91
+
92
+ ```
93
+ HF-Streamlit/
94
+ β”œβ”€β”€ app.py # Main Streamlit application
95
+ β”œβ”€β”€ requirements.txt # Python dependencies
96
+ β”œβ”€β”€ Dockerfile # Docker configuration
97
+ β”œβ”€β”€ README.md # Project documentation
98
+ └── HF-docker2/ # Additional Docker configurations
99
+ ```
100
+
101
+ ## 🎯 Usage
102
+
103
+ ### Dashboard Features
104
+
105
+ 1. **Chart Tab**:
106
+ - Adjust data points (10-500) using the sidebar slider
107
+ - Customize chart height (300-800px)
108
+ - Select from 5 color themes (blues, reds, greens, purples, oranges)
109
+ - View real-time metrics and KPIs
110
+
111
+ 2. **Data Explorer Tab**:
112
+ - Filter data by categories (A, B, C, D)
113
+ - Set value range filters using sliders
114
+ - View filtered datasets in tabular format
115
+ - Download filtered data as CSV
116
+
117
+ 3. **About Tab**:
118
+ - Learn about the application features
119
+ - Understand Streamlit capabilities
120
+
121
+ ### Customization
122
+
123
+ The app includes several customizable parameters:
124
+
125
+ - **Data Size**: Control the number of data points generated
126
+ - **Chart Height**: Adjust visualization height
127
+ - **Color Themes**: Choose from predefined color palettes
128
+ - **Filtering Options**: Multiple category and range filters
129
+
130
+ ## πŸ”§ Configuration
131
+
132
+ ### Environment Variables
133
+
134
+ The application uses default Streamlit configuration. You can customize it by creating a `.streamlit/config.toml` file:
135
+
136
+ ```toml
137
+ [server]
138
+ port = 8501
139
+ address = "0.0.0.0"
140
+
141
+ [theme]
142
+ primaryColor = "#1E88E5"
143
+ backgroundColor = "#FFFFFF"
144
+ secondaryBackgroundColor = "#F0F2F6"
145
+ ```
146
+
147
+ ## πŸš€ Deployment Options
148
+
149
+ ### Streamlit Cloud
150
+ 1. Push your code to GitHub
151
+ 2. Connect your repository to Streamlit Cloud
152
+ 3. Deploy with one click
153
+
154
+ ### Heroku
155
+ 1. Add a `Procfile`:
156
+ ```
157
+ web: streamlit run app.py --server.port=$PORT --server.address=0.0.0.0
158
+ ```
159
+
160
+ ### AWS/GCP/Azure
161
+ Use the provided Dockerfile for container-based deployments.
162
+
163
+ ## 🀝 Contributing
164
+
165
+ 1. Fork the repository
166
+ 2. Create a feature branch (`git checkout -b feature/amazing-feature`)
167
+ 3. Commit your changes (`git commit -m 'Add amazing feature'`)
168
+ 4. Push to the branch (`git push origin feature/amazing-feature`)
169
+ 5. Open a Pull Request
170
+
171
+ ## πŸ“„ License
172
+
173
+ This project is open source and available under the [MIT License](LICENSE).
174
+
175
+ ## πŸ†˜ Support
176
+
177
+ If you encounter any issues or have questions:
178
+
179
+ 1. Check the [Streamlit documentation](https://docs.streamlit.io/)
180
+ 2. Open an issue in this repository
181
+ 3. Refer to the troubleshooting section below
182
+
183
+ ## πŸ” Troubleshooting
184
+
185
+ ### Common Issues
186
+
187
+ **Port already in use:**
188
+ ```bash
189
+ streamlit run app.py --server.port=8502
190
+ ```
191
+
192
+ **Module not found:**
193
+ ```bash
194
+ pip install -r requirements.txt
195
+ ```
196
+
197
+ **Docker build fails:**
198
+ Ensure Docker is running and you have sufficient disk space.
199
+
200
+ ## πŸ“ˆ Performance
201
+
202
+ The application is optimized with:
203
+ - `@st.cache_data` decorator for data generation
204
+ - Efficient data filtering operations
205
+ - Responsive chart rendering with Plotly
206
+
207
+ ---
208
+
209
+ Made with ❀️ using [Streamlit](https://streamlit.io/)