Skip to content

A website that allows the user to input a ChatGPT related tweet and get the topic and sentiment of the tweet. Frontend with ReactJS and backend with Flask.

License

Notifications You must be signed in to change notification settings

bilbisli/ChatGPTweetTopicSentiment

Repository files navigation

ChatGPT Tweet Analysis

ChatGPT Tweet Analysis is a web application built with ReactJS and Flask that allows users to analyze the sentiment and topic of ChatGPT-related tweets.

Features

  • Analyze the sentiment of a ChatGPT-related tweet
  • Determine the topic of a ChatGPT-related tweet
  • User-friendly interface with real-time analysis results

Technologies Used

  • ReactJS: A JavaScript library for building user interfaces
  • Flask: A micro web framework for building web applications
  • BERTopic: A library for topic modeling using BERT embeddings
  • Sentence Transformers: A library for state-of-the-art sentence embeddings
  • Transformers: A library for natural language processing using transformer models

Prerequisites

  • Node.js (version 20.2.0)
  • Python (version 3.9.13)

Getting Started

  1. Install python, Node.js and git
  2. Open a terminal and clone the repository:
git clone https://github.com/bilbisli/ChatGPTweetTopicSentiment.git
  1. Create and activate a virtual environment for the Flask app:
cd ChatGPTweetTopicSentiment
py -3.9 -m venv venv
  • For macOS and Linux:
source venv/bin/activate
  • For Windows:
venv\Scripts\activate
  1. Install the dependencies for the Flask app:
pip install -r requirements.txt
  1. Start the Flask app:
python app.py
  1. In a separate terminal (opened at the root of the project), Install the dependencies for the React app:
cd frontend
npm install
  1. Start the React server:
npm start
  1. Access the application in your web browser: http://localhost:3000

Configuration

The following environment variables can be set or configured in the .env file:

  • TWEET_ANALYSIS_API_HOST: The hostname or IP address of the Tweet Analysis API (default: localhost)
  • TWEET_ANALYSIS_API_PORT: The port number of the Tweet Analysis API (default: 5000)

Usage

  1. Enter a ChatGPT-related tweet in the provided input field.
  2. Click the "Analyze" button to analyze the sentiment and topic of the tweet.
  3. The sentiment (positive, negative, neutral) and topic of the tweet will be displayed below.
  4. Repeat the process for additional tweets.

Demo

ChatGPT_twitter_Demo.mp4

Data

The data used for creating this project is available at: ChatGPT Twitter Dataset

Contributing

Contributions are welcome! If you find any bugs or have suggestions for improvements, please open an issue or submit a pull request.

License

This project is licensed under the MIT License.

About

A website that allows the user to input a ChatGPT related tweet and get the topic and sentiment of the tweet. Frontend with ReactJS and backend with Flask.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published