Create app.py
Browse filesFinished setting up the libraries; code the entire pipeline from file reception, processing, and output
app.py
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import numpy as np
|
| 2 |
+
import pandas as pd
|
| 3 |
+
import matplotlib.pyplot as plt
|
| 4 |
+
import joblib
|
| 5 |
+
import json
|
| 6 |
+
|
| 7 |
+
# custom functions
|
| 8 |
+
from cluster_utils import choose_k,
|
| 9 |
+
compute_cluster_centroids_pca, inverse_project_centroids, compute_cluster_stats,
|
| 10 |
+
identify_top_drivers
|
| 11 |
+
|
| 12 |
+
exploration_pipeline = joblib.load("exploration_pipeline.pkl")
|
| 13 |
+
core_pipeline = joblib.load("core_pipeline.pkl")
|
| 14 |
+
|