Upload folder using huggingface_hub
Browse files
app.py
CHANGED
|
@@ -26,7 +26,7 @@ feature_mapping = {
|
|
| 26 |
"printMediaType2": "print_media_type2",
|
| 27 |
"digitalMedia": "digital_media",
|
| 28 |
"educationalChannels": "educational_channels",
|
| 29 |
-
"referral": "referral"
|
| 30 |
}
|
| 31 |
|
| 32 |
|
|
@@ -50,7 +50,7 @@ def home():
|
|
| 50 |
|
| 51 |
# Single prediction
|
| 52 |
@extraaLearn_predictor_api.post("/v1/customers")
|
| 53 |
-
def
|
| 54 |
"""
|
| 55 |
Handles POST requests to predict sales revenue for a single product/store.
|
| 56 |
Expects a JSON payload with features.
|
|
@@ -74,7 +74,7 @@ def predict_sales_revenue():
|
|
| 74 |
|
| 75 |
|
| 76 |
|
| 77 |
-
return jsonify({"
|
| 78 |
|
| 79 |
# except Exception as e:
|
| 80 |
# return jsonify({"error": str(e)}), 500
|
|
|
|
| 26 |
"printMediaType2": "print_media_type2",
|
| 27 |
"digitalMedia": "digital_media",
|
| 28 |
"educationalChannels": "educational_channels",
|
| 29 |
+
"referral": "referral",
|
| 30 |
}
|
| 31 |
|
| 32 |
|
|
|
|
| 50 |
|
| 51 |
# Single prediction
|
| 52 |
@extraaLearn_predictor_api.post("/v1/customers")
|
| 53 |
+
def predict_customer_converted_to_a_paid():
|
| 54 |
"""
|
| 55 |
Handles POST requests to predict sales revenue for a single product/store.
|
| 56 |
Expects a JSON payload with features.
|
|
|
|
| 74 |
|
| 75 |
|
| 76 |
|
| 77 |
+
return jsonify({"Predicted_customer": predicted_customer})
|
| 78 |
|
| 79 |
# except Exception as e:
|
| 80 |
# return jsonify({"error": str(e)}), 500
|