Spaces:
Runtime error
Runtime error
Ruben Wolhandler
commited on
Commit
·
1ca6ae0
1
Parent(s):
03eed1f
fix errors 2
Browse files
app.py
CHANGED
@@ -101,11 +101,11 @@ if 'files' in state and "annotator" in state:
|
|
101 |
|
102 |
else:
|
103 |
st.info("Everything annotated.")
|
104 |
-
|
105 |
-
st.info(f"Annotated: {len(state.annotations)}, Remaining: {len(state.files)}")
|
106 |
-
|
107 |
-
st.download_button(
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
)
|
|
|
101 |
|
102 |
else:
|
103 |
st.info("Everything annotated.")
|
104 |
+
if 'annotations' in state and 'files' in state:
|
105 |
+
st.info(f"Annotated: {len(state.annotations)}, Remaining: {len(state.files)}")
|
106 |
+
|
107 |
+
st.download_button(
|
108 |
+
"Download annotations as CSV",
|
109 |
+
"\n".join([f"{k}\t{v}" for k, v in state.annotations.items()]),
|
110 |
+
file_name="annotations_faithfull.csv",
|
111 |
+
)
|