Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,76 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# ๐ Active Users Prediction Model (Simple Regression)
|
| 2 |
+
|
| 3 |
+
## ๐ง Overview
|
| 4 |
+
This project demonstrates a simple regression-based approach to estimate and predict active users in a Hugging Face Space.
|
| 5 |
+
|
| 6 |
+
Since Hugging Face does not provide direct access to real-time active user metrics, this model uses request counts as a proxy signal and applies a regression model to estimate user activity trends.
|
| 7 |
+
|
| 8 |
+
---
|
| 9 |
+
|
| 10 |
+
## ๐ Features
|
| 11 |
+
- Tracks incoming requests as a proxy for user activity
|
| 12 |
+
- Logs usage data over time
|
| 13 |
+
- Trains a Linear Regression model on historical data
|
| 14 |
+
- Predicts current active users based on timestamp
|
| 15 |
+
|
| 16 |
+
---
|
| 17 |
+
|
| 18 |
+
## ๐๏ธ How It Works
|
| 19 |
+
|
| 20 |
+
1. Each user interaction increases a counter
|
| 21 |
+
2. Data is stored in a CSV file (`usage.csv`)
|
| 22 |
+
3. The model is trained on:
|
| 23 |
+
- Time (timestamp)
|
| 24 |
+
- Active user count
|
| 25 |
+
4. The model predicts active users for the current time
|
| 26 |
+
|
| 27 |
+
---
|
| 28 |
+
|
| 29 |
+
## ๐ Project Structure
|
| 30 |
+
|
| 31 |
+
|
| 32 |
+
|
| 33 |
+
---
|
| 34 |
+
|
| 35 |
+
## โ๏ธ Model Details
|
| 36 |
+
|
| 37 |
+
- **Model Type:** Linear Regression
|
| 38 |
+
- **Library:** scikit-learn
|
| 39 |
+
- **Input Feature:** Timestamp
|
| 40 |
+
- **Output:** Estimated Active Users
|
| 41 |
+
|
| 42 |
+
---
|
| 43 |
+
|
| 44 |
+
## ๐ Example Output
|
| 45 |
+
|
| 46 |
+
|
| 47 |
+
---
|
| 48 |
+
|
| 49 |
+
## โ ๏ธ Limitations
|
| 50 |
+
|
| 51 |
+
- This is an approximation, not real user tracking
|
| 52 |
+
- Counts requests, not unique users
|
| 53 |
+
- No session or IP-based filtering
|
| 54 |
+
- Model retrains on each request (not optimized)
|
| 55 |
+
|
| 56 |
+
---
|
| 57 |
+
|
| 58 |
+
## ๐ฎ Future Improvements
|
| 59 |
+
|
| 60 |
+
- Use a database instead of CSV
|
| 61 |
+
- Track unique users via sessions/IP
|
| 62 |
+
- Add time-based features (hour, day)
|
| 63 |
+
- Use advanced models (Random Forest, LSTM)
|
| 64 |
+
- Deploy with AWS for scalability
|
| 65 |
+
|
| 66 |
+
---
|
| 67 |
+
|
| 68 |
+
## ๐งโ๐ป Author
|
| 69 |
+
|
| 70 |
+
Udyan Trivedi
|
| 71 |
+
|
| 72 |
+
---
|
| 73 |
+
|
| 74 |
+
## ๐ License
|
| 75 |
+
|
| 76 |
+
MIT License
|