Spaces:
Sleeping
Sleeping
Commit ·
f4af3c4
1
Parent(s): d210108
Add system
Browse files182 unmodified lines1831841851861861881891871881894 unmodified lines194195196197198199200201202203204205206182 unmodified lines with 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 lines repo_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