Skip to content

Commit

Permalink
minor import change
Browse files Browse the repository at this point in the history
  • Loading branch information
Dhanush123 committed Feb 27, 2020
1 parent 7c32a10 commit 3d8226d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 22 deletions.
21 changes: 0 additions & 21 deletions cloudbuild.yaml

This file was deleted.

4 changes: 3 additions & 1 deletion test1.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import os

from flask import Flask, jsonify
from gcp_utils.googlebucket import gcs_download_file
from shaktiutils.gcp_utils.googlebucket import gcs_download_file
from joblib import load
from dotenv import load_dotenv

app = Flask(__name__)

Expand All @@ -12,6 +13,7 @@
@app.before_request
def load_resources():
'''Flask template is currently only for scikit-learn models'''
load_dotenv()
if not model:
model_path = gcs_download_file(os.environ.get("MODEL_PATH"))
model = load(model_path)
Expand Down

0 comments on commit 3d8226d

Please sign in to comment.