Spaces:
Running
Running
KarishmaShirsath
commited on
Commit
•
3c7fa1a
1
Parent(s):
58f1abe
Fix file analyze bug
Browse files
app.py
CHANGED
@@ -119,7 +119,7 @@ def main():
|
|
119 |
if st.button('Analyze'):
|
120 |
with st.spinner('Wait for it... the model is loading'):
|
121 |
# cached_predict_ner_tags(extracted_text)
|
122 |
-
masked_text = anonymize(extracted_text, st_operator)
|
123 |
# masked_text = cached_analyze_text(extracted_text)
|
124 |
st.text_area("Masked text:", value=masked_text, height=200) # Display the extracted text
|
125 |
if extracted_text:
|
@@ -142,7 +142,7 @@ def main():
|
|
142 |
if st.button('Analyze'):
|
143 |
with st.spinner('Wait for it... the model is loading'):
|
144 |
# cached_predict_ner_tags(text)
|
145 |
-
masked_text = anonymize(text, st_operator)
|
146 |
# masked_text = cached_analyze_text(text)
|
147 |
st.text_area("Masked text:", value=masked_text, height=200)
|
148 |
#create word file
|
@@ -154,7 +154,7 @@ def main():
|
|
154 |
with st.spinner('Wait for it... the model is loading'):
|
155 |
# cached_predict_ner_tags(file_contents.decode())
|
156 |
# masked_text = cached_analyze_text(file_contents.decode())
|
157 |
-
masked_text = anonymize(file_contents.decode(), st_operator)
|
158 |
st.text_area("Masked text:", value=masked_text, height=200)
|
159 |
st.download_button(label="Download",data = masked_text,file_name="masked_text.txt")
|
160 |
|
|
|
119 |
if st.button('Analyze'):
|
120 |
with st.spinner('Wait for it... the model is loading'):
|
121 |
# cached_predict_ner_tags(extracted_text)
|
122 |
+
masked_text = anonymize(extracted_text, st_operator, st_model)
|
123 |
# masked_text = cached_analyze_text(extracted_text)
|
124 |
st.text_area("Masked text:", value=masked_text, height=200) # Display the extracted text
|
125 |
if extracted_text:
|
|
|
142 |
if st.button('Analyze'):
|
143 |
with st.spinner('Wait for it... the model is loading'):
|
144 |
# cached_predict_ner_tags(text)
|
145 |
+
masked_text = anonymize(text, st_operator, st_model)
|
146 |
# masked_text = cached_analyze_text(text)
|
147 |
st.text_area("Masked text:", value=masked_text, height=200)
|
148 |
#create word file
|
|
|
154 |
with st.spinner('Wait for it... the model is loading'):
|
155 |
# cached_predict_ner_tags(file_contents.decode())
|
156 |
# masked_text = cached_analyze_text(file_contents.decode())
|
157 |
+
masked_text = anonymize(file_contents.decode(), st_operator, st_model)
|
158 |
st.text_area("Masked text:", value=masked_text, height=200)
|
159 |
st.download_button(label="Download",data = masked_text,file_name="masked_text.txt")
|
160 |
|