osbm commited on
Commit
181e118
·
1 Parent(s): e8505b6

fix api command

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -101,7 +101,12 @@ def update_vote(
101
  df.to_csv(file_path, index=False)
102
 
103
  # push the file to the dataset
104
- api.push_to_hub(file_path, repo_id="aifred-smart-life-coach/labels", repo_type="dataset", commit_message=f"Voted for {image}")
 
 
 
 
 
105
 
106
  if 'loggedin' not in st.session_state:
107
  st.session_state['loggedin'] = 'false'
 
101
  df.to_csv(file_path, index=False)
102
 
103
  # push the file to the dataset
104
+ api.upload_file(
105
+ path_or_fileobj=file_path,
106
+ path_in_repo=f"{voter}.csv",
107
+ repo_id="aifred-smart-life-coach/labels", repo_type="dataset",
108
+ commit_message=f"{voter} voted for {image}"
109
+ )
110
 
111
  if 'loggedin' not in st.session_state:
112
  st.session_state['loggedin'] = 'false'