{"id":20716698,"url":"https://github.com/kingabzpro/nlp-tweets-web-app","last_synced_at":"2025-04-23T13:33:01.856Z","repository":{"id":49150409,"uuid":"339337832","full_name":"kingabzpro/NLP-Tweets-Web-App","owner":"kingabzpro","description":"Using Streamlit app and ExpertAi to find sentiment Analysis of Airlines tweets from Database and using the interactive tool to predict new sentiment from latest tweets. ","archived":false,"fork":false,"pushed_at":"2021-06-26T09:46:50.000Z","size":11503,"stargazers_count":4,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-30T00:05:36.907Z","etag":null,"topics":["airlines-tweets","edge-nl-api","natural-language","nlp-machine-learning","streamlit","visualization","webapp"],"latest_commit_sha":null,"homepage":"https://airline-tweets-nlp.herokuapp.com/","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kingabzpro.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}},"created_at":"2021-02-16T08:55:57.000Z","updated_at":"2022-06-07T06:18:37.000Z","dependencies_parsed_at":"2022-09-08T02:37:23.654Z","dependency_job_id":null,"html_url":"https://github.com/kingabzpro/NLP-Tweets-Web-App","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kingabzpro%2FNLP-Tweets-Web-App","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kingabzpro%2FNLP-Tweets-Web-App/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kingabzpro%2FNLP-Tweets-Web-App/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kingabzpro%2FNLP-Tweets-Web-App/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kingabzpro","download_url":"https://codeload.github.com/kingabzpro/NLP-Tweets-Web-App/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250440087,"owners_count":21430950,"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":["airlines-tweets","edge-nl-api","natural-language","nlp-machine-learning","streamlit","visualization","webapp"],"created_at":"2024-11-17T03:06:35.302Z","updated_at":"2025-04-23T13:33:01.836Z","avatar_url":"https://github.com/kingabzpro.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"[\u003cimg alt=\"Python\" src=\"https://img.shields.io/badge/python-ffe666?logo=python\u0026logoColor=Black\u0026style=for-the-badge\" /\u003e](https://www.python.org/)[\u003cimg alt=\"Expertai\" src=\"https://img.shields.io/badge/ExpertAi.APi-3cb67c?logo=sonarlint\u0026logoColor=white\u0026style=for-the-badge\" /\u003e](https://www.expert.ai/)[\u003cimg alt=\"streamlit\" src=\"https://img.shields.io/badge/streamlit-ff004d?logo=streamlit\u0026logoColor=white\u0026style=for-the-badge\" /\u003e](https://www.streamlit.io/)[\u003cimg alt=\"plotly\" src=\"https://img.shields.io/badge/Webapp-9978ec?logo=heroku\u0026logoColor=white\u0026style=for-the-badge\" /\u003e](https://airline-tweets-nlp.herokuapp.com/)[\u003cimg alt=\"plotly\" src=\"https://img.shields.io/badge/plotly-666698?logo=gitter\u0026logoColor=white\u0026style=for-the-badge\" /\u003e](https://plotly.com/)[\u003cimg alt=\"pandas\" src=\"https://img.shields.io/badge/pandas-3c3eb6?logo=pandas\u0026logoColor=white\u0026style=for-the-badge\" /\u003e](https://pandas.pydata.org/) \n\n\n![Twitter](http://www.thesis123.com/wp-content/uploads/2019/01/Sentiment-Analysis-Twitter.png)\n\n# Airline Tweets NLP\nThis project is one of my machine learning and data-driven web apps made using Streamlit. \n\nThe goal of this project is to visualize various sentiment and exploratory analysis on tweets about US airlines.\n\n\n\n## About Expert.Ai\n\n![Expert.ai_logo](https://d2ueix13hy5h3i.cloudfront.net/wp-content/uploads/2020/10/Expert.ai_logo.jpg)\n\nExpert.ai Edge Natural Language API—or simply **Edge NL API**—provides the same capabilities of the [expert.ai Natural Language API](https://docs.expert.ai/nlapi/latest/), but on premises or on a private cloud.\n\nPython client for the expert.ai Natural Language APIs adds Natural Language understanding capabilities to your Python apps. The client can use either the Cloud based [Natural Language API](https://docs.expert.ai/nlapi/latest/) or a local instance of [Edge NL API](https://docs.expert.ai/edgenlapi/latest/).\n\n### Installation (development)\n\nYou can use `pip` to install the library:\n\n```bash\n$ pip install expertai-nla\n```\n\n### Setup the server\n\nYou can download a standard Edge NL API server from the [expert.ai developer portal](https://developer.expert.ai/).\nIf you don't already have an account, register on the portal, then sign in.\nYou will find the Edge NL API packages in the **Developer** section of the portal.\n\nIf you use [expert.ai Studio](https://docs.expert.ai/studio/latest/ide/), you can create custom Edge NL API servers that deliver the text intelligence engines corresponding to your projects.\nYou just need to [deploy the project](https://docs.expert.ai/studio/latest/ide/how-to/deploy/).\nCustom servers provide both the Natural Language Understanding capabilities of the standard servers and the custom categorization and extraction capabilities you have designed.\n\nThe Edge NL API server can be used in both Windows and Linux and the server package includes the startup script for both operating systems:\n\n- Run `runmeWindows.cmd` to start the server on Windows.\n- Run `runmeLinux.sh` to start the server on Linux.\n\n### Usage\n\nThe Python client code expects expert.ai developer account credentials to be available as environment variables:\n\n- Linux:\n\n```bash\nexport EAI_USERNAME=YOUR_USER\nexport EAI_PASSWORD=YOUR_PASSWORD\n```\n\n- Windows:\n\n```shell\nSET EAI_USERNAME=YOUR_USER\nSET EAI_PASSWORD=YOUR_PASSWORD\n```\n\nYou can also define them inside your code:\n\n```python\nimport os\nos.environ[\"EAI_USERNAME\"] = 'your@account.email'\nos.environ[\"EAI_PASSWORD\"] = 'yourpwd'\n```\n\nIf you don't have an account, sign up on the [developer portal](https://developer.expert.ai/).\n\n## Using Sentimental and Text Analysis Api\n\nUsing Streamlit app and ExpertAi to find sentiment Analysis of Airlines tweets from Database and using the interactive tool to predict new sentiment from latest tweets. \n\n```python\nif st.button('Run'):\n        document = client.sentiment(text)\n        st.write('Sentiment:', document.sentiment.overall)     \nelse :\n  st.text('Write a tweet to get Sentiment Analysis')\n        \n```\n## Preping Dataset\nFirst preparing Dataset so that the query or Visualization and Analysis become faster in Streamlit App.\n\n```python\nfrom tqdm import tqdm\ntqdm.pandas()\n\ntweet['expertai_sentiment']=tweet['text'].progress_apply(client.sentiment).progress_apply(lambda x: x.sentiment.overall)\n\ndef emo(sentiment):\n    if sentiment\u003e2 and sentiment\u003c25 :## emotions\n        return 'Happy'\n    elif sentiment\u003c-2 and sentiment\u003e-25:\n        return 'Sad'\n    elif sentiment\u003c-25:\n        return 'Awful'\n    elif sentiment\u003e25:\n        return 'awesome'\n    else:\n        return 'Meh'\n\ntweet['emotions']=tweet['expertai_sentiment'].progress_apply(emo)\ntweet.to_csv('expertaitweets.csv',index=False)\n```\n\n## About the Dataset\n\nThe dataset was scraped from Twitter in February 2015 and contributors were first asked to classify positive, negative, and neutral tweets, \n\nfollowed by categorizing negative reasons (such as \"late flight\" or \"rude service\"). \n\nMore details about the dataset can be found  [Kaggle Crowdflow](https://www.kaggle.com/crowdflower/twitter-airline-sentiment)\n\n\n\n## References\n\nThis project was inspired from Coursera's: [Create Interactive Dashboards with Streamlit and Python](https://www.coursera.org/projects/interactive-dashboards-streamlit-python) guided project.\n\n## Demo\n\n### Checking Expert.ai Edge API\n\n![Demo1](Demo/Demo1.gif)\n\n### Checking Sidebars\n\n![Demo2](Demo/Demo2.gif)\n\n\n\n# Experimental App\n\nI have created entire app with help of Expert Ai API [Experiment](https://gitlab.com/kingabzpro/Airline-Tweets-NLP/blob/main/experiment.py) .\n\nIt took me more then 2 hours to train entire Dataset but then it stop due to concetion Erro with API so I reduced the number of rows to train my data again.\n\n[![View in Deepnote](https://deepnote.com/static/buttons/view-in-deepnote-white.svg)](https://deepnote.com/viewer/github/kingabzpro/NLP-Tweets-Web-App/blob/main/Expert.AI%20file/Dataprep.ipynb)\n\n![image-20210215015624065](Demo/Demo3.png)\n\nI will be enhancing my App by adding more NLP features provided by Expert Ai:\n\n- [Relation extraction](https://docs.expert.ai/edgenlapi/latest/guide/relation-extraction/)\n- [Deep linguistic analysis](https://docs.expert.ai/edgenlapi/latest/guide/linguistic-analysis/)\n- [Document classification](https://docs.expert.ai/edgenlapi/latest/guide/classification/)\n- [Information extraction](https://docs.expert.ai/edgenlapi/latest/guide/extraction/)\n\n⭐Do Star it if you like my work⭐ .\n\n\u003e Image curtesy thesis123.com\n\u003e\n\u003e This guy's Repo have helped me alot so do start him too [richard](https://github.com/richardcsuwandi)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkingabzpro%2Fnlp-tweets-web-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkingabzpro%2Fnlp-tweets-web-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkingabzpro%2Fnlp-tweets-web-app/lists"}