File size: 1,755 Bytes
f4f6038 51df0c1 11c79a7 | 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 | ---
title: Student Personality Analysis
emoji: π
colorFrom: blue
colorTo: indigo
sdk: docker
app_port: 7860
pinned: false
---
# Student Personality Analysis
A web application to determine student personality traits based on academic grades.
## Features
- **Premium UI**: Glassmorphism design.
- **SQLite Database**: Persistent storage for history.
- **Dockerized**: specific for Hugging Face Spaces.
## π How to Run Your Own Copy
### Method 1: Duplicate (Recommended)
Simply click the **Duplicate this Space** button in the settings menu of this Space to create your own copy in seconds.
### Method 2: Manual Deployment
1. Create a new Space on Hugging Face.
2. Select **Docker** as the SDK.
3. Upload these files to your Space.
4. The application will build and run automatically (Port 7860).
## π‘ API Documentation
You can interact with the application programmatically using the following JSON endpoints.
### 1. Analyze Student (`POST /api/analyze`)
Submit student marks to get grade and personality trait.
**Request:**
```json
POST /api/analyze
Content-Type: application/json
{
"name": "John Doe",
"sub1": 85,
"sub2": 90,
"sub3": 88
}
```
**Response:**
```json
{
"success": true,
"data": {
"name": "John Doe",
"average": 88,
"grade": "A",
"trait": "Extroverted"
}
}
```
### 2. Get Recent Students (`GET /api/students`)
Returns a list of the 10 most recently analyzed students.
**Response:**
```json
[
{
"id": 1,
"name": "Alice",
"subject1": 80,
"subject2": 85,
"subject3": 90
},
...
]
```
### 3. Get Rules (`GET /api/rules`)
Returns the grading rules and score ranges.
### 4. Get Traits (`GET /api/traits`)
Returns the mapping of grades to personality traits.
|