Spaces:
Sleeping
Sleeping
Commit ·
f4af3c4
1
Parent(s): d210108
Add system
Browse files182 unmodified lines1831841851861871881891901911924 unmodified lines197198199200201202182 unmodified lineswith open(default_log_path, "w") as f:f.write(json.dumps(log_entry, indent=1))default_tsv_path = f"{FEEDBACK_DIR}/augmented_{timestamp}_{user_id}.tsv"tsv_path = outputs["sorted_events"]df = pd.read_excel(tsv_path)df.to_csv(default_tsv_path, sep='\t', index=False)try:api = HfApi()4 unmodified linesrepo_type="dataset",token=HF_TOKEN)except Exception as e:182 unmodified lines1831841851861871881894 unmodified lines194195196197198199200201202203204205206182 unmodified lineswith open(default_log_path, "w") as f:f.write(json.dumps(log_entry, indent=1))tsv_path = outputs["sorted_events"]try:api = HfApi()4 unmodified linesrepo_type="dataset",token=HF_TOKEN)api.upload_file(path_or_fileobj=tsv_path,path_in_repo=f"logs/augmented_{timestamp}_{user_id}.tsv",repo_id=HF_DATASET_REPO,repo_type="dataset",token=HF_TOKEN)except Exception as e:
app.py+7-3