{"id":20744439,"url":"https://github.com/nickklos10/AI-emotion-analyzer","last_synced_at":"2025-09-27T18:31:48.044Z","repository":{"id":252433564,"uuid":"840425931","full_name":"nickklos10/NLP-emotion-detection","owner":"nickklos10","description":"An AI web app for detecting emotions in text using OpenAI's GPT-4o-mini model, built with Flask","archived":false,"fork":false,"pushed_at":"2024-08-30T14:31:58.000Z","size":22,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-11-17T07:16:05.565Z","etag":null,"topics":["ai","flask","javascript","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nickklos10.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-09T17:17:04.000Z","updated_at":"2024-08-30T14:32:01.000Z","dependencies_parsed_at":"2024-08-09T19:24:33.552Z","dependency_job_id":null,"html_url":"https://github.com/nickklos10/NLP-emotion-detection","commit_stats":null,"previous_names":["nickklos10/nlp-emotion-detecion"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickklos10%2FNLP-emotion-detection","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickklos10%2FNLP-emotion-detection/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickklos10%2FNLP-emotion-detection/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickklos10%2FNLP-emotion-detection/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nickklos10","download_url":"https://codeload.github.com/nickklos10/NLP-emotion-detection/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234453276,"owners_count":18835006,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","flask","javascript","python"],"created_at":"2024-11-17T07:15:37.228Z","updated_at":"2025-09-27T18:31:48.039Z","avatar_url":"https://github.com/nickklos10.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AI Emotion Analyzer\n\nThis is a web application that detects emotions in text using OpenAI's GPT-4o-mini model. The app is built with Flask for the backend and HTML/CSS/JavaScript for the frontend. It allows users to input text, analyzes the sentiment, and returns the likelihood of each emotion as a percentage.\n\n### Table of Contents\n\n- [`Installation`](#installation)\n- [`Usage`](#usage)\n- [`API Endpoints`](#api-endpoints)\n- [`Deployment`](#deployment)\n- [`Contributing`](#contributing)\n\n### Installation\n\n**Prerequisites**\n\n- Python 3.7 or higher\n- pip\n- Git\n\n**Requirements**\n\n```\npip install flask flask-cors openai\n```\n\n**Steps**\n\n1. Clone the repository:\n\n```\ngit clone https://github.com/nickklos10/NLP-emotion-detecion.git\ncd NLP-emotion-detecion\n```\n\n2. Create a virtual environment (optional but recommended):\n\n```\npython -m venv venv\nsource venv/bin/activate  # On Windows use `venv\\Scripts\\activate`\n```\n\n3. Export your API key as an environment variable:\n\nFor macOS:\n\n```\nexport OPENAI_API_KEY='your-api-key-here'\n```\n\nFor Windows:\n\n```\nset OPENAI_API_KEY=your-api-key-here\n```\n\n4. Run the Flask application:\n\n```\npython server.py\n```\n\n5. Access the web app:\n\nOpen your browser and go to http://127.0.0.1:4000 to start using the app.\n\n### Usage\n\n- Enter the text you want to analyze in the input field.\n- Click the \"Run Sentiment Analysis\" button.\n- The app will display the likelihood of each emotion (anger, disgust, fear, joy, sadness) and highlight the dominant emotion.\n\n### API Endpoints\n\n- GET /: Renders the main HTML page for the application.\n- POST /emotionDetector: Accepts text input and returns the likelihood of each emotion and the dominant emotion in a human-readable format.\n\n### Deployment\n\nThe application is deployed on `Railway`. You can access it at: [AI Emotion Analyzer](https://nlp-emotion-detection-production.up.railway.app/)\n\n### Contributing\n\n**Contributions are welcome!** Please fork the repository and submit a pull request for any improvements, bug fixes, or new features.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnickklos10%2FAI-emotion-analyzer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnickklos10%2FAI-emotion-analyzer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnickklos10%2FAI-emotion-analyzer/lists"}