Spaces:
Runtime error
Runtime error
updated traning data read
Browse files- .DS_Store +0 -0
- app.py +9 -2
- data/recommendations.csv +0 -0
.DS_Store
ADDED
|
Binary file (6.15 kB). View file
|
|
|
app.py
CHANGED
|
@@ -474,6 +474,12 @@ def import_data(bucket, key):
|
|
| 474 |
df_data = pd.read_csv(location, encoding = "ISO-8859-1",index_col=0)
|
| 475 |
df_data = df_data.reset_index(drop=True)
|
| 476 |
return df_data
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 477 |
|
| 478 |
### Model Training
|
| 479 |
|
|
@@ -492,8 +498,9 @@ def get_predictions(selected_variable, selected_industry, selected_campaign,
|
|
| 492 |
# y_name = 'ytest_MLP_Conversion_Rate.csv'
|
| 493 |
key = 'modelCTA_MLP_ConversionRate.sav'
|
| 494 |
|
| 495 |
-
training_dataset = import_data('s3://emailcampaigntrainingdata/ModelCTA', 'recommendations.csv')
|
| 496 |
-
|
|
|
|
| 497 |
# y_test = import_data('s3://emailcampaigntrainingdata/ModelCTA', y_name)
|
| 498 |
|
| 499 |
|
|
|
|
| 474 |
df_data = pd.read_csv(location, encoding = "ISO-8859-1",index_col=0)
|
| 475 |
df_data = df_data.reset_index(drop=True)
|
| 476 |
return df_data
|
| 477 |
+
|
| 478 |
+
### Read in data
|
| 479 |
+
def read_data(path, fname):
|
| 480 |
+
df_data = pd.read_csv(path+fname, encoding = "ISO-8859-1",index_col=0)
|
| 481 |
+
df_data = df_data.reset_index(drop=True)
|
| 482 |
+
return df_data
|
| 483 |
|
| 484 |
### Model Training
|
| 485 |
|
|
|
|
| 498 |
# y_name = 'ytest_MLP_Conversion_Rate.csv'
|
| 499 |
key = 'modelCTA_MLP_ConversionRate.sav'
|
| 500 |
|
| 501 |
+
# training_dataset = import_data('s3://emailcampaigntrainingdata/ModelCTA', 'recommendations.csv')
|
| 502 |
+
training_dataset=read_data("./data/","recommendations.csv")
|
| 503 |
+
# X_test = import_data('s3://emailcampaigntrainingdata/ModelCTA', X_name)
|
| 504 |
# y_test = import_data('s3://emailcampaigntrainingdata/ModelCTA', y_name)
|
| 505 |
|
| 506 |
|
data/recommendations.csv
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|