Skip to content

InSight-Hack-the-North-2021/backend

Repository files navigation

InSight: Hack the North 2021

For a video/devpost demonstration visit

Table of Contents

  • General

    • clone the code in your local environment
    • in terminal type the cmd npm i, to install all dependencies
  • Hootsuite Dependencies

    • Make sure you have a developer account with hootsuite. Make sure you have an app on that account with access to the REST API.
    • Create a .env file in the root of the project. Inside the file create a variable named CREDENTIAL and put in your Hootsuite App's REST API Client ID:REST API Client Secret in base64.
       CREDENTIAL=base64(REST API Client ID:REST API Client Secret)
    
  • Firebase Dependencies

    • Create a firebase project
    • Go to your Firebase project -> Project Settings -> Service Accounts and download the firebase SDK by clicking Generate New Private Key button
    • Rename the file to serviceAccountKey.json and put it in the root folder. The file will look like this
     {
      "type": ,
      "project_id": ,
      "private_key_id": ,
      "private_key": ,
      "client_email": ,
      "client_id": ,
      "auth_uri": ,
      "token_uri": ,
      "auth_provider_x509_cert_url": ,
      "client_x509_cert_url": 
    }
    
  • to run the code type npm run start and head over to http:localhost:8000/.

1. Scoring and Recommendation

  • POST http://localhost:8000/image/score:
{
    "blurred_scored": Integer || null,
    "facial_attr_score": Integer || null,
    "no_of_faces_score": Integer || null,
    "face_label_score": Integer || null,
    "safe_search_score": Integer || null,
    "food_score": Integer || null,
    "Final score": Integer || null,
    "recommendation": {
          "joy": String || null,
          "blurr": String || null,
          "msg": String || null, 
          "anger" : String || null,
          "safesearch" : String || null,
          "faces" : String || null
     },
    "labels": [
          "Gesture",
          "Formal wear",
          "Event", .......      
    ]
}

2. Hootsuite

  • POST http://localhost:8000/hootsuite/schedulePost/:text
    • :text is a parameter, it contains the text that user wants to enter with a post
    • Response - If it return status 200 its all good, for any other status pls give an error.
  • Right now all users can use a Premium Account for free, so we want to add a payment method along with an option of 5 days free trial
  • We plan to make a Mobile app, and make the InSight a perfect Social Media assistant by including a daily recommendation system that guides users by computing a posting pattern based on their recent posts which have done well.

Email : [email protected]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published