Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 0 additions & 19 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,12 @@
# This is a basic workflow to help you get started with Actions

name: CI

# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [main]
pull_request:
branches: [main]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: akhileshns/[email protected] # This is the action
with:
heroku_api_key: ${{secrets.HEROKU_API_KEY}} # Located in GitHub secrets
heroku_app_name: "web-eye-tracker-1204" # Must be unique in Heroku
heroku_email: "[email protected]"
8 changes: 5 additions & 3 deletions app/routes/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import csv
import math
import numpy as np

import uuid
from pathlib import Path
import os
import pandas as pd
Expand All @@ -24,6 +24,7 @@


# Constants

ALLOWED_EXTENSIONS = {"txt", "webm"}
COLLECTION_NAME = "session"

Expand Down Expand Up @@ -162,7 +163,7 @@ def batch_predict():

base_path = Path().absolute() / "app/services/calib_validation/csv/data"
calib_csv_path = base_path / f"{calib_id}_fixed_train_data.csv"
predict_csv_path = base_path / "temp_batch_predict.csv"
predict_csv_path = base_path / f"temp_batch_predict_{uuid.uuid4().hex}.csv"

# CSV temporário
with open(predict_csv_path, "w", newline="") as csvfile:
Expand All @@ -187,7 +188,8 @@ def batch_predict():
screen_width=screen_width,
screen_height=screen_height,
)

os.remove(predict_csv_path)

return jsonify(convert_nan_to_none(result))

except Exception as e:
Expand Down