Spaces:
Sleeping
Sleeping
File size: 569 Bytes
2a117d2 c8f09d8 2a117d2 c8f09d8 2a117d2 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
from datasets import Dataset
from datetime import datetime
def init_ranking_data():
ds = Dataset.from_dict({'image_id': [], 'modelVersion_id': [], 'ranking': [], "user_name": [], "timestamp": []})\
# add example data
# note that image_id is a string, other ids are int
ds = ds.add_item({'image_id': '0', 'modelVersion_id': 0, 'ranking': 0, "user_name": "example_data", "timestamp": datetime.now().strftime("%Y-%m-%d %H:%M:%S")})
ds.push_to_hub("MAPS-research/GEMRec-Ranking", split='train')
if __name__ == '__main__':
init_ranking_data()
|