Daniel Tse
commited on
Commit
·
d6920f0
1
Parent(s):
5431882
Join values into single string.
Browse files
app.py
CHANGED
|
@@ -82,7 +82,9 @@ def summarize_podcast(audiotranscription):
|
|
| 82 |
summarized_text = summarizer(text_chunks)
|
| 83 |
st.session_state['summary'] = summarized_text
|
| 84 |
print(f"Summary: {summarized_text}")
|
| 85 |
-
|
|
|
|
|
|
|
| 86 |
|
| 87 |
def prepare_text_for_qa(audiotranscription):
|
| 88 |
|
|
@@ -119,7 +121,7 @@ if st.button("Process Audio File"):
|
|
| 119 |
##Summary of Text
|
| 120 |
"""
|
| 121 |
)
|
| 122 |
-
st.text(podcast_summary
|
| 123 |
|
| 124 |
if st.button("Summarize Podcast"):
|
| 125 |
with open('transcription.txt', 'r') as file:
|
|
@@ -130,4 +132,4 @@ if st.button("Summarize Podcast"):
|
|
| 130 |
##Summary of Text
|
| 131 |
"""
|
| 132 |
)
|
| 133 |
-
st.text(podcast_summary
|
|
|
|
| 82 |
summarized_text = summarizer(text_chunks)
|
| 83 |
st.session_state['summary'] = summarized_text
|
| 84 |
print(f"Summary: {summarized_text}")
|
| 85 |
+
#summarized_text is an array of objects with key summary_text
|
| 86 |
+
full_summary = ' '.join(item['summary_text'] for item in summarized_text)
|
| 87 |
+
return full_summary
|
| 88 |
|
| 89 |
def prepare_text_for_qa(audiotranscription):
|
| 90 |
|
|
|
|
| 121 |
##Summary of Text
|
| 122 |
"""
|
| 123 |
)
|
| 124 |
+
st.text(podcast_summary)
|
| 125 |
|
| 126 |
if st.button("Summarize Podcast"):
|
| 127 |
with open('transcription.txt', 'r') as file:
|
|
|
|
| 132 |
##Summary of Text
|
| 133 |
"""
|
| 134 |
)
|
| 135 |
+
st.text(podcast_summary)
|