Skip to content

Commit

Permalink
fix: update paths
Browse files Browse the repository at this point in the history
  • Loading branch information
vishalmhjn committed Jun 7, 2024
1 parent 837c4e8 commit 7f0658c
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 6 deletions.
26 changes: 26 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Define variables
PYTHON := python3
ENV := .env
VENV := ${ENV}/bin/activate

install:
$(PYTHON) -m venv ${ENV} && \
. ${VENV} && \
pip install -r requirements.txt

lint:
pylint --disable=R,C ./src

format:
black src/*.py

test:
# python scopuscaller/test_call_scopus.py

run:
source $(VENV) && cd src/ && \
$(PYTHON) call_data_api.py && \
$(PYTHON) process_data.py && \
$(PYTHON) train.py && \
$(PYTHON) predict.py && \
$(PYTHON) app.py
12 changes: 6 additions & 6 deletions src/app.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
from flask import Flask, render_template, jsonify

from flask import Flask, render_template
import pandas as pd
from config_interface import *

from config_data import input_date_formatted, prediction_date_formatted
from frontend import DashboardData

pd.options.mode.chained_assignment = None

dashboard_object = DashboardData(
path_o_t_1=f"../data/processed_data/inference_data_{INFERENCE_INPUT_DATE_FMT}.csv",
path_pt_1=f"../predictions/knn_{INFERENCE_INPUT_DATE_FMT}.csv",
path_pt=f"../predictions/knn_{INFERENCE_PREDICTION_DATE_FMT}.csv",
path_o_t_1=f"../data/processed_data/inference_data_{input_date_formatted}.csv",
path_pt_1=f"../predictions/knn_{input_date_formatted}.csv",
path_pt=f"../predictions/knn_{prediction_date_formatted}.csv",
path_variance=f"../data/variance/df_var_2023.csv",
)

Expand Down

0 comments on commit 7f0658c

Please sign in to comment.