Spaces:
Sleeping
Sleeping
fix api command
Browse files
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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'
|