[go: up one dir, main page]

Skip to content

How to install

Jesús González Álvarez edited this page Jul 6, 2022 · 5 revisions

Backend

Requirements

Configure env variables

I use this file to set the variables that could be public, as they don't contain any password or field that could compromise the security of the application. To store the rest of variables, I use the Secret Manager tool by Microsoft.

Configuring the Secret Manager tool

👋 Help

To get the options for gmail you can read this

👋 Help

To get your connection string you can read this

Save this json in a file called secrets.json in backend/Api. Configure the values correctly.

{
   "TokenOptions": {
      "SecurityKey": "<random-security-key>"
   },
   "PasswordOptions": {
      "SaltSize": 16,
      "KeySize": 32,
      "Iterations": 10000
   },
   "EmailOptions": {
      "UserName": "<your-email-client-username>",
      "Port": "<your-email-client-port>",
      "Password": "<your-email-client-password>"
   },
   "DatabaseConnectionString": "<your-database-connection-string>"
}
cd backend/Api
dotnet user-secrets init
# For Windows users
type .\secrets.json | dotnet user-secrets set

# For mac/linux users
cat ./secrets.json | dotnet user-secrets set

Create the database

cd backend/Infrastructure
## If you want to use your own migration
dotnet ef migrations add "<your-migration-name>" -s ../Api

dotnet ef database update -s ../Api

Populate the database

There is a table, called "Dataset". This is used to create the questions from the tests. You can fill it with data from the dataset used to verify the signs made by the users (WLASL dataset). In order to do it, you can install the data from this gist.

👋 Help

If you use Azure Data Studio, you can do it this way.

Frontend

Installation

cd frontend
npm install

AI Module

Configuration

Go to aiservice/.env file and set your secrets.

SECRET_KEY=<your-secret-key-is-equals-to-your-backend-secret-key>
UPLOAD_FOLDER='./upload'

NUM_CLASSES_EASY = 300
NUM_CLASSES_MEDIUM = 1000
NUM_CLASSES_HARD = 2000
FILE_MODEL_EASY = './model/archived/asl300/FINAL_nslt_300_iters=2997_top1=56.14_top5=79.94_top10=86.98.pt'
FILE_MODEL_MEDIUM = './model/archived/asl1000/FINAL_nslt_1000_iters=5104_top1=47.33_top5=76.44_top10=84.33.pt'
FILE_MODEL_HARD = './model/archived/asl2000/FINAL_nslt_2000_iters=5104_top1=32.48_top5=57.31_top10=66.31.pt'
FILE_PREPROCESS = './model/preprocess/wlasl_class_list.txt'
DEVICE = 'cpu'
MIN_H = 226
MIN_W = 226
MIN   = 226
MAX_H = 256
MAX_W = 256
PROB  = 0.5
NUM_CHANNELS = 3