refresh to next entry on submit and comment out mongo clearing code for safety :P
parent
4fd05a56d0
commit
aae03a6ae4
|
|
@ -65,9 +65,9 @@ if not hasattr(st, "mongo_connected"):
|
||||||
st.mongo_connected = True
|
st.mongo_connected = True
|
||||||
|
|
||||||
|
|
||||||
def clear_mongo_corrections():
|
# def clear_mongo_corrections():
|
||||||
col = pymongo.MongoClient("mongodb://localhost:27017/").test.asr_validation
|
# col = pymongo.MongoClient("mongodb://localhost:27017/").test.asr_validation
|
||||||
col.delete_many({"type": "correction"})
|
# col.delete_many({"type": "correction"})
|
||||||
|
|
||||||
|
|
||||||
def preprocess_datapoint(idx, rel, sample):
|
def preprocess_datapoint(idx, rel, sample):
|
||||||
|
|
@ -153,6 +153,7 @@ def main(manifest: Path):
|
||||||
st.update_entry(
|
st.update_entry(
|
||||||
sample["gold_chars"], {"status": selected, "correction": correct_code}
|
sample["gold_chars"], {"status": selected, "correction": correct_code}
|
||||||
)
|
)
|
||||||
|
st.update_cursor(sample_no + 1)
|
||||||
if correction_entry:
|
if correction_entry:
|
||||||
st.markdown(
|
st.markdown(
|
||||||
f'Your Response: **{correction_entry["value"]["status"]}** Correction: **{correction_entry["value"]["correction"]}**'
|
f'Your Response: **{correction_entry["value"]["status"]}** Correction: **{correction_entry["value"]["correction"]}**'
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue