Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files
app.py
CHANGED
|
@@ -19,6 +19,7 @@ def predict_sales():
|
|
| 19 |
# Get JSON data from the request
|
| 20 |
data = request.get_json()
|
| 21 |
|
|
|
|
| 22 |
# Extract relevant customer features from the input data. The order of the column names matters.
|
| 23 |
sample = {
|
| 24 |
'Product_Weight': data['Product_Weight'],
|
|
@@ -32,6 +33,7 @@ def predict_sales():
|
|
| 32 |
'Product_Id_char': data['Product_Id_char'],
|
| 33 |
'Store_Age_Years': data['Store_Age_Years'],
|
| 34 |
}
|
|
|
|
| 35 |
|
| 36 |
# Convert the extracted data into a DataFrame and preprocess it
|
| 37 |
input_data = pd.DataFrame([sample])
|
|
|
|
| 19 |
# Get JSON data from the request
|
| 20 |
data = request.get_json()
|
| 21 |
|
| 22 |
+
print(f'data = {data}')
|
| 23 |
# Extract relevant customer features from the input data. The order of the column names matters.
|
| 24 |
sample = {
|
| 25 |
'Product_Weight': data['Product_Weight'],
|
|
|
|
| 33 |
'Product_Id_char': data['Product_Id_char'],
|
| 34 |
'Store_Age_Years': data['Store_Age_Years'],
|
| 35 |
}
|
| 36 |
+
print(f'sample = {sample}')
|
| 37 |
|
| 38 |
# Convert the extracted data into a DataFrame and preprocess it
|
| 39 |
input_data = pd.DataFrame([sample])
|