Spaces:
Runtime error
Runtime error
Upload 2 files
Browse files- app.py +10 -2
- data_streamlit_align.csv +0 -0
app.py
CHANGED
@@ -15,6 +15,14 @@ if "annotations" not in state:
|
|
15 |
state.counter = 0
|
16 |
state.submit = 0
|
17 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
|
19 |
def submit():
|
20 |
if state.submit == 0:
|
@@ -32,9 +40,9 @@ if state.current_file < len(state.files):
|
|
32 |
st.header(f'Topic id : {selected_file["topic_id"]}')
|
33 |
for i, document in enumerate(selected_file['document'].split('|||||')):
|
34 |
st.markdown(f"**Document {i+1}:**")
|
35 |
-
st.
|
36 |
st.header('Summary:')
|
37 |
-
st.write(
|
38 |
state.a = st.radio('a', OPTIONS)
|
39 |
st.button('Next', on_click=submit)
|
40 |
|
|
|
15 |
state.counter = 0
|
16 |
state.submit = 0
|
17 |
|
18 |
+
def clean_doc(doc):
|
19 |
+
# to_remove = ["<!DOCTYPE html>", '<html lang=""en"">', '<head>', "<title>displaCy</title>", '</head>', '</html>'
|
20 |
+
# "<body", "style=", '"font-size: 16px; font-family: -apple-system, BlinkMacSystemFont, ',"'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; padding: 4rem 2rem; direction: ",'ltr">', '</body>']
|
21 |
+
|
22 |
+
# for rem in to_remove:
|
23 |
+
# doc = doc.replace(rem, "")
|
24 |
+
return doc
|
25 |
+
|
26 |
|
27 |
def submit():
|
28 |
if state.submit == 0:
|
|
|
40 |
st.header(f'Topic id : {selected_file["topic_id"]}')
|
41 |
for i, document in enumerate(selected_file['document'].split('|||||')):
|
42 |
st.markdown(f"**Document {i+1}:**")
|
43 |
+
st.markdown(document, unsafe_allow_html=True)
|
44 |
st.header('Summary:')
|
45 |
+
st.write(selected_file['summary'], unsafe_allow_html=True)
|
46 |
state.a = st.radio('a', OPTIONS)
|
47 |
st.button('Next', on_click=submit)
|
48 |
|
data_streamlit_align.csv
CHANGED
The diff for this file is too large to render.
See raw diff
|
|