Skip to content
Merged
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
6 changes: 3 additions & 3 deletions cornac/serving/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def create_app():

@app.route("/recommend", methods=["GET"])
def recommend():
global model, train_set
global model, train_set # noqa: F824

if model is None:
return "Model is not yet loaded. Please try again later.", 400
Expand Down Expand Up @@ -187,7 +187,7 @@ def add_feedback():

@app.route("/evaluate", methods=["POST"])
def evaluate():
global model, train_set, metric_classnames
global model, train_set, metric_classnames # noqa: F824

if model is None:
return "Model is not yet loaded. Please try again later.", 400
Expand Down Expand Up @@ -241,7 +241,7 @@ def validate_query(query):


def process_evaluation(test_set, query, exclude_unknowns):
global model, train_set
global model, train_set # noqa: F824

rating_threshold = query.get("rating_threshold", 1.0)
user_based = (
Expand Down
Loading