{"id":19218565,"url":"https://github.com/donmaruko/sentiment-analysis-api","last_synced_at":"2026-04-10T02:48:44.744Z","repository":{"id":193894812,"uuid":"689691654","full_name":"donmaruko/Sentiment-Analysis-API","owner":"donmaruko","description":"Flask-based API for sentiment analysis using deep learning models and includes endpoints for text and file input, database storage, and integrated Swagger documentation.","archived":false,"fork":false,"pushed_at":"2023-10-04T15:40:24.000Z","size":5550,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-04T19:22:30.253Z","etag":null,"topics":["api","deep-learning","deep-neural-networks","flask","keras","lstm","machine-learning","neural-network","rnn","scikit-learn","scikitlearn-machine-learning","sklearn","sqlite3","swagger","swagger-ui","tensorflow"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/donmaruko.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2023-09-10T16:00:50.000Z","updated_at":"2023-10-05T18:12:38.000Z","dependencies_parsed_at":"2023-09-10T17:21:27.434Z","dependency_job_id":"cb037697-46d2-455a-a1a8-d56bc5e3c079","html_url":"https://github.com/donmaruko/Sentiment-Analysis-API","commit_stats":null,"previous_names":["donmaruko/2300956_10_don_apichallenge_platinum","donmaruko/sentiment-analysis-api"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/donmaruko%2FSentiment-Analysis-API","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/donmaruko%2FSentiment-Analysis-API/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/donmaruko%2FSentiment-Analysis-API/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/donmaruko%2FSentiment-Analysis-API/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/donmaruko","download_url":"https://codeload.github.com/donmaruko/Sentiment-Analysis-API/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240292381,"owners_count":19778311,"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":["api","deep-learning","deep-neural-networks","flask","keras","lstm","machine-learning","neural-network","rnn","scikit-learn","scikitlearn-machine-learning","sklearn","sqlite3","swagger","swagger-ui","tensorflow"],"created_at":"2024-11-09T14:27:14.862Z","updated_at":"2026-04-10T02:48:39.710Z","avatar_url":"https://github.com/donmaruko.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sentiment Analysis API with Flask and Swagger\n\nThis is a Flask-based API for performing sentiment analysis using pre-trained deep-learning models. It includes endpoints for both text and file input, and it stores the analyzed data in a SQLite database. Swagger is integrated for easy API documentation.\n\nThis repo contains:\n- the flask app .py and .ymls\n- .py files for the LSTM and RNN models\n- .csv files used for training\n- neural network calculations report\n- overall presentation\n\n## Table of Contents\n\n- [Installation](#installation)\n- [Usage](#usage)\n- [Endpoints](#endpoints)\n- [Database](#database)\n- [Swagger Documentation](#swagger-documentation)\n- [Contributing](#contributing)\n\n## Installation\n\n1. Clone this repository to your local machine:\n\n```shell\ngit clone https://github.com/donmaruko/Sentiment-Analysis-API.git\n```\n\n2. Install the required Python packages by running the following command in your project directory:\n\n```shell\npip install -r requirements.txt\n```\n\n## Usage\n\n1. Make sure you have completed the installation steps. Before running app.py, please run all the model.py files to generate the pickle files\n\n2. Start the Flask application:\n\n```shell\npython app.py\n```\n\nThis will start the Flask development server, and your API will be accessible at `http://localhost:8000/docs`.\n\n3. You can use the API endpoints to perform sentiment analysis on text input or file input.\n\n## Endpoints\n\n### Text Input Endpoints\n\n- `/lstm` (POST): Perform sentiment analysis using an LSTM model with text input.\n- `/rnn` (POST): Perform sentiment analysis using an RNN model with text input.\n- `/nn` (POST): Perform sentiment analysis using an MLPClassifier model with text input.\n\n### File Input Endpoints\n\n- `/lstmfile` (POST): Perform sentiment analysis using a LSTM model with file input.\n- `/rnnfile` (POST): Perform sentiment analysis using a RNN model with file input.\n- `/nnfile` (POST): Perform sentiment analysis using a MLPClassifier model with file input.\n\n### View and Clear Database\n\n- `/view_database` (GET): View the data stored in the SQLite database.\n- `/clear_database` (POST): Clear the data stored in the SQLite database.\n\n## Database\n\nThe API uses an SQLite database (`data.db`) to store the analyzed data. You can view the stored data using the `/view_database` endpoint and clear the database using the `/clear_database` endpoint.\n\n## Swagger Documentation\n\nSwagger is integrated to provide API documentation. You can access the Swagger UI by visiting `http://localhost:8000/docs/` in your web browser. The Swagger documentation provides detailed information about each API endpoint, including request and response examples.\n\n## Contributing\n\nContributions are welcome! If you have any suggestions, bug reports, or feature requests, please create an issue or submit a pull request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdonmaruko%2Fsentiment-analysis-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdonmaruko%2Fsentiment-analysis-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdonmaruko%2Fsentiment-analysis-api/lists"}