Skip to content

WilliamSilveiraF/sentiment-analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

b53ee12 · Oct 29, 2023

History

17 Commits
Oct 28, 2023
Oct 28, 2023
Oct 25, 2023
Oct 25, 2023
Oct 26, 2023
Oct 26, 2023
Oct 26, 2023
Oct 25, 2023
Oct 26, 2023
Oct 25, 2023
Oct 29, 2023
Oct 29, 2023
Oct 29, 2023
Oct 25, 2023
Oct 29, 2023
Oct 29, 2023
Oct 29, 2023

Repository files navigation

Sentiment Analysis FastAPI Project

This is a sentiment analysis API developed with FastAPI

Prerequisites

  • Docker
  • Docker Compose
  • Google Cloud Platform
  • PostgreSQL

Configuration

Environment Variables

Create a file named .env in the project root directory and add your configurations, following the example below:

DATABASE_URL=postgresql://william:password@db:5432/sentimentanalysis_db

Google Cloud Credentials

export GOOGLE_APPLICATION_CREDENTIALS="gcp.json"

To authenticate with the Google Cloud Platform, you'll need to create a service account and download the JSON key file. Futhermore, rename as gcp.json and put in the base of project /.

{
  "type": "service_account",
  "project_id": "",
  "private_key_id": "",
  "private_key": "",
  "client_email": "",
  "client_id": "",
  "auth_uri": "",
  "token_uri": "",
  "auth_provider_x509_cert_url": "",
  "client_x509_cert_url": "",
  "universe_domain": ""
}

Installing

git clone https://github.com/WilliamSilveiraF/sentiment-analysis.git


cd sentiment-analysis


docker compose up

Usage

The server is up and running at http://localhost:8080/

Flow Diagram

The user invokes the endpoint with an audio file. Subsequently, the Speech-To-Text API from Google Cloud Platform transcribes the content. With the generated text, we will run summarization and sentiment analysis models, and store the resulting data in database for retrieval at a later time.

all text

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published