File size: 1,703 Bytes
81678dd
 
 
 
 
 
 
 
 
 
 
1773560
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
---
license: mit
language: en
pipeline_tag: tabular-regression
tags:
- regression
- sklearn
- demo
- active-users
---

# ๐Ÿ“Š Active Users Prediction Model (Simple Regression)

## ๐Ÿง  Overview
This project demonstrates a simple regression-based approach to estimate and predict active users in a Hugging Face Space.

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.

---

## ๐Ÿš€ Features
- Tracks incoming requests as a proxy for user activity
- Logs usage data over time
- Trains a Linear Regression model on historical data
- Predicts current active users based on timestamp

---

## ๐Ÿ—๏ธ How It Works

1. Each user interaction increases a counter
2. Data is stored in a CSV file (`usage.csv`)
3. The model is trained on:
   - Time (timestamp)
   - Active user count
4. The model predicts active users for the current time

---

## ๐Ÿ“‚ Project Structure



---

## โš™๏ธ Model Details

- **Model Type:** Linear Regression
- **Library:** scikit-learn
- **Input Feature:** Timestamp
- **Output:** Estimated Active Users

---

## ๐Ÿ“ˆ Example Output


---

## โš ๏ธ Limitations

- This is an approximation, not real user tracking
- Counts requests, not unique users
- No session or IP-based filtering
- Model retrains on each request (not optimized)

---

## ๐Ÿ”ฎ Future Improvements

- Use a database instead of CSV
- Track unique users via sessions/IP
- Add time-based features (hour, day)
- Use advanced models (Random Forest, LSTM)
- Deploy with AWS for scalability

---

## ๐Ÿง‘โ€๐Ÿ’ป Author

Udyan Trivedi

---

## ๐Ÿ“œ License

MIT License