Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -206,17 +206,6 @@ if Run_Button and input_text:
|
|
206 |
html = custom_css + spacy.displacy.render(spacy_display, style="ent", minify=True, manual=True)
|
207 |
st.write(html, unsafe_allow_html=True)
|
208 |
|
209 |
-
# Download button
|
210 |
-
export_file_type = uploaded_file.type.split("/")[-1] if uploaded_file is not None else "txt"
|
211 |
-
masked_file_content = export_masked_text(masked_text, export_file_type)
|
212 |
-
if masked_file_content:
|
213 |
-
st.download_button(
|
214 |
-
label="Download Masked Text",
|
215 |
-
data=masked_file_content,
|
216 |
-
file_name=f"masked_output.{export_file_type}",
|
217 |
-
mime=f"application/{export_file_type}" if export_file_type != "txt" else "text/plain"
|
218 |
-
)
|
219 |
-
|
220 |
st.subheader("Masking Dictionary")
|
221 |
st.json(mask_dict)
|
222 |
|
|
|
206 |
html = custom_css + spacy.displacy.render(spacy_display, style="ent", minify=True, manual=True)
|
207 |
st.write(html, unsafe_allow_html=True)
|
208 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
209 |
st.subheader("Masking Dictionary")
|
210 |
st.json(mask_dict)
|
211 |
|