ppsingh commited on
Commit
eb99439
1 Parent(s): 7025ca1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -58,17 +58,20 @@ with st.form("annotation_form"):
58
 
59
  idx = np.random.randint(0,3)
60
 
61
- st.markdown("#Text")
62
  st.write(paraList[topic][tag][idx]['textsegment'])
63
 
64
- st.markdown("#Tag")
65
  st.write(tag)
66
 
67
  feedback = st.selectbox('0 If Tag is not a good keyword for text, 5 for prefect match',(0,1,2,3,4,5))
68
  submitted = st.form_submit_button("Submit")
69
  if submitted:
70
  paraList[topic][tag][idx]['annotation'].append(feedback)
71
- st.write(type(paraList))
 
 
 
72
 
73
 
74
  #c1, c2, c3 = st.columns([3, 1, 1])
 
58
 
59
  idx = np.random.randint(0,3)
60
 
61
+ st.markdown("**Text**")
62
  st.write(paraList[topic][tag][idx]['textsegment'])
63
 
64
+ st.markdown("**Tag**")
65
  st.write(tag)
66
 
67
  feedback = st.selectbox('0 If Tag is not a good keyword for text, 5 for prefect match',(0,1,2,3,4,5))
68
  submitted = st.form_submit_button("Submit")
69
  if submitted:
70
  paraList[topic][tag][idx]['annotation'].append(feedback)
71
+ with open("data/{}".format(file_name), "w") as outfile:
72
+ json.dump(paraList, outfile)
73
+ repo.push_to_hub('added new annotation')
74
+ # st.write(type(paraList))
75
 
76
 
77
  #c1, c2, c3 = st.columns([3, 1, 1])