Code Monkey home page Code Monkey logo

utrack's Introduction


Project under Consulting and Analytics Club, IITG

1. Technologies Used

  1. Tweepy API
  2. NLTK
  3. BERT Model
  4. Tensorflow
  5. Seaborn
  6. Streamlit

2. Project Description

2.1 Data Extraction and Preprocessing

We scraped data for each illness using the Tweepy API, based on keywords and phrases for each category. Additionally, we scraped tweets that didn't contain these keywords. This data acted as the ‘neutral’ data. The data was cleaned using libraries like regex, NLTK. Links, emojis, emoticons, and symbols were removed.

2.2 DL Model

We explored Transformer models and found that BERT(Bidirectional Encoder Representations from Transformers) was better-suited for sentiment analysis. We used a pretrained BERT model and fine-tuned it on our training data. We trained a model for each class.
The output given by the final layer was not fed to any activation function; it was instead given as input to a custom function to normalize and standardize the data. The function is given below:


2.3 Visualisation and Deployment

We used Seaborn to display the caculated level of Loneliness, Stress, and Anxiety for each user across time, thus enabling us to see how the user's mental state varied over time. Moreover, we estimate the weighted average for each category, over previous tweets [0:LOW,1:HIGH]. Additonally, you can also view each specific tweet and its scores. Deployment was done using Streamlit.

3. Files

  • Cleaning Tweets.py - Script to clean scraped tweets
  • Extracting Targeted Tweets.py - Script to scrape a user's Twitter information
  • Streamlit Deployment.py - Script to deploy the project
  • Streamlit Deployment.ipynb - Jupyter Notebook to deploy the project
  • Extracted Tweets - Training Data
  • Training Models:
    • Anxiety Model.py
    • Lonely Model.py
    • Stress Model.py

4. Usage

To use UTrack, first add this folder to your Google Drive.
Then run Streamlit Deployment.ipynb on Google Colab. Click on the ngrok link produced by the .ipynb file.

Once you go to the localhost, use the following video as a reference:

demo video

5. Team

6. References

7. License

MIT

utrack's People

Contributors

arsh2k01 avatar caciitg avatar jaswanth-gudiseva avatar narmin24 avatar roshan-shaji avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.