{"id":20147279,"url":"https://github.com/machphy/senti-analysis-flask","last_synced_at":"2026-05-10T18:56:48.711Z","repository":{"id":247328557,"uuid":"823215220","full_name":"machphy/senti-analysis-flask","owner":"machphy","description":"This project is a comprehensive sentiment analysis web application built with Flask. It allows users to input text and receive real-time predictions on whether the sentiment is positive or negative, based on a pre-trained machine learning model.  app.py serves as the main Flask application, managing web routes and integrating the sentiment model.","archived":false,"fork":false,"pushed_at":"2024-07-08T04:35:51.000Z","size":1122,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-03T00:22:21.489Z","etag":null,"topics":[],"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/machphy.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":"2024-07-02T15:46:16.000Z","updated_at":"2024-09-03T16:58:08.000Z","dependencies_parsed_at":"2024-07-08T05:44:23.903Z","dependency_job_id":"0aeb8519-2ee8-4846-938d-5ed857ce857d","html_url":"https://github.com/machphy/senti-analysis-flask","commit_stats":null,"previous_names":["machphy/senti-analysis-flask"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/machphy/senti-analysis-flask","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/machphy%2Fsenti-analysis-flask","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/machphy%2Fsenti-analysis-flask/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/machphy%2Fsenti-analysis-flask/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/machphy%2Fsenti-analysis-flask/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/machphy","download_url":"https://codeload.github.com/machphy/senti-analysis-flask/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/machphy%2Fsenti-analysis-flask/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32867988,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-10T13:40:02.631Z","status":"ssl_error","status_checked_at":"2026-05-10T13:40:02.145Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2024-11-13T22:28:19.393Z","updated_at":"2026-05-10T18:56:48.671Z","avatar_url":"https://github.com/machphy.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# senti-analysis-flask\n\nstructure \n\nsentiment_analysis_project/\n│\n├── app.py\n├── data_preprocessing_and_model_training.py\n├── sentiment_model.pkl\n└── templates/\n    ├── index.html\n    └── result.html\n\n\nSentiment Analysis Flask Application\nThis project implements a sentiment analysis web application using Flask. It allows users to input text and get a prediction of whether the sentiment is positive or negative based on a pre-trained model.\n\nSetup\nPrerequisites\nPython 3.x installed on your system\nGit installed on your system (optional, for cloning the repository)\nInstallation\nClone the repository:\n\nbash\nCopy code\ngit clone https://github.com/machphy/senti-analysis-flask.git\ncd senti-analysis-flask\nInstall dependencies:\n\nbash\nCopy code\npip install -r requirements.txt\nData Preprocessing and Model Training\nBefore running the application, the sentiment analysis model (sentiment_model.pkl) needs to be trained. Follow these steps:\n\nbash\nCopy code\npython data_preprocessing_and_model_training.py\nThis script downloads the movie reviews dataset, preprocesses the data, trains a TF-IDF vectorizer and a Multinomial Naive Bayes classifier, evaluates the model's accuracy, and saves it as sentiment_model.pkl.\n\nRunning the Application\nTo start the Flask application locally:\n\nbash\nCopy code\npython app.py\nThe application will run on http://127.0.0.1:5000/ (or http://localhost:5000/). Open this URL in your web browser to access the application.\n\nUsage\nEnter text into the provided text area on the homepage.\nClick the \"Analyze\" button to submit the text for sentiment analysis.\nView the predicted sentiment result on the result page.\nFiles and Directories\napp.py: Flask application script handling web routes and model integration.\ndata_preprocessing_and_model_training.py: Script for data preprocessing, model training, and saving the trained model.\nsentiment_model.pkl: Pre-trained sentiment analysis model.\ntemplates/: Directory containing HTML templates (index.html, result.html) for the web interface.\nContributing\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.\n\nLicense\nMIT\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmachphy%2Fsenti-analysis-flask","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmachphy%2Fsenti-analysis-flask","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmachphy%2Fsenti-analysis-flask/lists"}