File size: 624 Bytes
b284359 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
import os
import random
import pandas as pd
def predictor(image_link, category_id, entity_name):
'''
Call your model/approach here
'''
#TODO
return "" if random.random() > 0.5 else "10 inch"
if __name__ == "__main__":
DATASET_FOLDER = '../dataset/'
test = pd.read_csv(os.path.join(DATASET_FOLDER, 'test.csv'))
test['prediction'] = test.apply(
lambda row: predictor(row['image_link'], row['group_id'], row['entity_name']), axis=1)
output_filename = os.path.join(DATASET_FOLDER, 'test_out.csv')
test[['index', 'prediction']].to_csv(output_filename, index=False) |