Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -81,6 +81,20 @@ def main():
|
|
| 81 |
key_moments = podcast_info['podcast_highlights']
|
| 82 |
for moment in key_moments.split('\n'):
|
| 83 |
st.markdown(f"<p style='margin-bottom: 5px;'>{moment}</p>", unsafe_allow_html=True)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 84 |
except Exception as e:
|
| 85 |
st.sidebar.error(f"An error occurred: {e}")
|
| 86 |
|
|
|
|
| 81 |
key_moments = podcast_info['podcast_highlights']
|
| 82 |
for moment in key_moments.split('\n'):
|
| 83 |
st.markdown(f"<p style='margin-bottom: 5px;'>{moment}</p>", unsafe_allow_html=True)
|
| 84 |
+
|
| 85 |
+
export_button = st.button("Export Summary to Word")
|
| 86 |
+
|
| 87 |
+
if export_button:
|
| 88 |
+
byte_io = export_to_word(podcast_info)
|
| 89 |
+
|
| 90 |
+
# Download link for the Word document
|
| 91 |
+
st.download_button(
|
| 92 |
+
label="Download Summary",
|
| 93 |
+
data=byte_io,
|
| 94 |
+
file_name=f"{selected_podcast}_summary.docx",
|
| 95 |
+
mime="application/vnd.openxmlformats-officedocument.wordprocessingml.document"
|
| 96 |
+
)
|
| 97 |
+
|
| 98 |
except Exception as e:
|
| 99 |
st.sidebar.error(f"An error occurred: {e}")
|
| 100 |
|