Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thaiebu/emotion_tracker_using_llama
https://github.com/thaiebu/emotion_tracker_using_llama
Last synced: 7 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/thaiebu/emotion_tracker_using_llama
- Owner: Thaiebu
- Created: 2024-12-22T14:03:59.000Z (15 days ago)
- Default Branch: main
- Last Pushed: 2024-12-22T14:08:47.000Z (15 days ago)
- Last Synced: 2024-12-22T15:21:18.243Z (15 days ago)
- Language: Python
- Size: 346 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
## API Documentation
1. This application provides endpoints for visualizing mood and activity trends, user profile insights, and AI-based recommendations.
2. The root endpoint serves an interactive dashboard in HTML format.
3. Users can view mood distribution, activity time, and mood patterns for specific profiles.
4. It includes a POST endpoint to predict mood based on user activity with optional language input.
5. Comprehensive schema validation ensures robust error handling and structured JSON responses.1. **`/` Endpoint**: Serves the dashboard.
- **Input**: None.
- **Output**: HTML content.2. **`/visualize-mood-distribution`**: Displays a mood distribution pie chart.
- **Input**: None.
- **Output**: JSON containing a base64-encoded image of the chart.3. **`/visualize-activity-time`**: Shows activity time distribution as a histogram.
- **Input**: None.
- **Output**: JSON containing a base64-encoded histogram image.4. **`/display-ai-recommendations`**: Provides AI-generated activity recommendations.
- **Input**: None.
- **Output**: JSON array with user recommendations.5. **`/view-user-profile/{user_id}`**: Displays user profile and mood trends.
- **Input**: User ID (path parameter).
- **Output**: JSON with mood counts, user details, and a mood trend image.6. **`/predict_mood`**: Predicts mood based on activity.
- **Input**: JSON with activity, user name, and optional language.
- **Output**: JSON with predicted mood and recommendation.7. **Schemas**:
- **`MoodRequest`**: Requires `activity` and `user_name`, optionally includes `language`.
- **`MoodResponse`**: Includes `mood` and `recommendation`.8. **Validation**: Handles input errors using `HTTPValidationError`.
9. **Content Types**: Primarily JSON responses, except for the dashboard, which returns HTML.
10. **Error Handling**: Ensures HTTP 422 for validation issues and HTTP 500 for server errors.
Home page
![alt text](backend/image_1.png)
Fast API Docs Page
![alt text](backend/image.png)