Skip to content

Commit

Permalink
Merge branch '0.0.1' of https://github.com/Anandhex/ReachOut into 0.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Anandhex committed Apr 19, 2020
2 parents ab27fca + d909570 commit 8854969
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ml/ml_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from sklearn.cluster import KMeans
import json,re
import random
import copy

app = Flask(__name__)

Expand Down Expand Up @@ -139,7 +140,11 @@ def predict_interest():
for rule in association_rules:
if rule["Antecedent"] == interests:
return jsonify({"interests":rule["Consequent"]})
return jsonify({"interests":"Found Nothing"})

inte = copy.deepcopy(list(interest_id_dict.keys()))
random.shuffle(inte)

return jsonify({"interests":inte[:3]})


if __name__ == "__main__":
Expand Down

0 comments on commit 8854969

Please sign in to comment.