File size: 2,894 Bytes
0cdca51
 
 
 
 
 
 
 
 
 
 
 
 
 
e9c150f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
94fcc86
e9c150f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
94fcc86
 
e9c150f
 
 
 
94fcc86
e9c150f
 
 
 
 
 
94fcc86
e9c150f
 
 
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
---
title: PersonaMind  ML Model for Extrovert vs Introvert Classification
emoji: 🧠
colorFrom: blue
colorTo: red
sdk: streamlit
sdk_version: "1.40.0"   # latest stable streamlit
app_file: app.py
pinned: false
license: mit
---



# PersonalityClassifier — Introvert vs Extrovert Predictor

A lightweight Streamlit app that predicts whether a person is likely an Introvert or Extrovert from simple daily-behavior inputs.

---

## Table of Contents
- **[Demo](#demo)**
- **[Features](#features)**
- **[Installation / Setup](#installation--setup)**
- **[Usage](#usage)**
- **[Configuration / Options](#configuration--options)**
- **[Contributing](#contributing)**
- **[License](#license)**
- **[Acknowledgements / Credits](#acknowledgements--credits)**

---

## Demo
Real demo assets found in `./demo/`:

- Image: `./demo/demo.png`
- Video: `./demo/demo.mp4`

Example render:

![App Screenshot](./demo/demo.png)

If your viewer supports video playback in Markdown, you can also preview the short clip:

```text
./demo/demo.mp4
```

---

## Features
- **Simple UI** built with `streamlit` for quick interaction.
- **Preprocessing utilities** in `utils.py` convert raw inputs to model-ready features.
- **Saved model loading** via `joblib` from `./models/model.pkl`.
- **Deterministic inference** using a binary classifier (Introvert vs Extrovert).

---

## Installation / Setup
Use a Python virtual environment for isolation.

```bash
# Create a virtual environment
python -m venv .venv

# Activate it
# On Linux/Mac:
source .venv/bin/activate
# On Windows:
.venv\Scripts\activate

# Install dependencies
pip install -r requirements.txt
```

---

## Usage
Run the Streamlit app locally:

```bash
streamlit run app.py
```

App entrypoint: `app.py`
- Loads the model using `utils.load_model("./models/model.pkl")`.
- Renders inputs and predictions using helpers in `ui.py`.

Expected project structure:
```
PersonalityClassifier/
├─ app.py
├─ ui.py
├─ utils.py
├─ models/
│  └─ model.pkl
└─ demo/
   ├─ demo.png
   └─ demo.mp4
```

---

## Configuration / Options
- **Model path**: `./models/model.pkl` (default in `app.py`). Replace the file if you want another trained model. Ensure the environment includes the libraries used to train/serialize it (e.g., `scikit-learn`).
- **Caching**: `utils.load_model` uses `@st.cache_resource` to cache the loaded model across reruns.

---

## Contributing
Contributions are welcome! Please:
- **Open an issue** to discuss proposed changes.
- **Create a PR** with a clear description, small focused commits, and screenshots for UI changes.

---

## License
This project is licensed under the **MIT License**. See the [`LICENSE`](./LICENSE) file for details.

---

## Acknowledgements / Credits
- **Streamlit** for rapid web UI development.
- **scikit-learn** and **joblib** for model training/serialization workflows.