Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -55,21 +55,20 @@ with st.form("annotation_form"):
|
|
| 55 |
#st.write(subtopics)
|
| 56 |
val = np.random.randint(0,len(subtopics)-1)
|
| 57 |
tag = subtopics[val]
|
| 58 |
-
st.write(tag)
|
| 59 |
|
| 60 |
idx = np.random.randint(0,3)
|
| 61 |
-
st.write(idx)
|
| 62 |
|
| 63 |
-
st.markdown("Text")
|
| 64 |
st.write(paraList[topic][tag][idx]['textsegment'])
|
| 65 |
|
| 66 |
-
st.markdown("Tag")
|
| 67 |
st.write(tag)
|
| 68 |
|
| 69 |
feedback = st.selectbox('0 If Tag is not a good keyword for text, 5 for prefect match',(0,1,2,3,4,5))
|
| 70 |
submitted = st.form_submit_button("Submit")
|
| 71 |
if submitted:
|
| 72 |
-
|
|
|
|
| 73 |
|
| 74 |
|
| 75 |
#c1, c2, c3 = st.columns([3, 1, 1])
|
|
|
|
| 55 |
#st.write(subtopics)
|
| 56 |
val = np.random.randint(0,len(subtopics)-1)
|
| 57 |
tag = subtopics[val]
|
|
|
|
| 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])
|