Skip to content

Aaravkataria24/xtesting-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TweetLab Backend

This is the backend service for the TweetLab application, deployed on Google Cloud.

Setup

  1. Create a virtual environment:
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install dependencies:
pip install -r requirements.txt
  1. Run the development server:
python main.py

Deployment

The backend is deployed on Google Cloud. To deploy:

  1. Make sure you have the Google Cloud SDK installed
  2. Run the deployment command:
gcloud app deploy

API Endpoints

The backend provides the following API endpoints:

  • /api/tweets - Get tweet data
  • /api/analyze - Analyze tweet sentiment
  • /api/stats - Get tweet statistics

Environment Variables

Create a .env file with the following variables:

API_KEY=your_api_key
MODEL_PATH=path_to_model

Model Files

The following model files are required:

  • finetuned_twitter_roberta_multi.pt
  • regressor_model.pkl
  • replies_model.pkl
  • retweets_model.pkl
  • likes_model.pkl
  • tfidf_vectorizer.pkl

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages