Update functions.py
Browse files- functions.py +5 -5
functions.py
CHANGED
@@ -467,11 +467,11 @@ def highlight_entities(article_content,summary_output):
|
|
467 |
def summary_downloader(raw_text):
|
468 |
'''Download the summary generated'''
|
469 |
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
|
476 |
@st.cache_data
|
477 |
def generate_eval(raw_text, N, chunk):
|
|
|
467 |
def summary_downloader(raw_text):
|
468 |
'''Download the summary generated'''
|
469 |
|
470 |
+
b64 = base64.b64encode(raw_text.encode()).decode()
|
471 |
+
new_filename = "new_text_file_{}_.txt".format(time_str)
|
472 |
+
st.markdown("#### Download Summary as a File ###")
|
473 |
+
href = f'<a href="data:file/txt;base64,{b64}" download="{new_filename}">Click to Download!!</a>'
|
474 |
+
st.markdown(href,unsafe_allow_html=True)
|
475 |
|
476 |
@st.cache_data
|
477 |
def generate_eval(raw_text, N, chunk):
|