Update app.py
Browse files
app.py
CHANGED
@@ -72,7 +72,7 @@ if st.button('Start Transcription'):
|
|
72 |
st.info("Transcribing...")
|
73 |
st.success("Transcription complete")
|
74 |
result = model.transcribe(audio_file_path)
|
75 |
-
|
76 |
|
77 |
with st.expander("See transcript"):
|
78 |
st.markdown(transcript)
|
@@ -176,21 +176,22 @@ for i, summary in enumerate(summaries):
|
|
176 |
st.write(f"### Summary {i+1}")
|
177 |
st.write(summary)
|
178 |
|
179 |
-
# Display the Whisper transcription, extracted claims, and BERT summaries in
|
180 |
-
if transcript:
|
181 |
st.text("Transcription, Extracted Claims, and BERT Summaries:")
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
|
|
|
|
|
|
|
|
189 |
for i, summary in enumerate(summaries):
|
190 |
-
|
191 |
-
|
192 |
-
# Display the concatenated results
|
193 |
-
st.text(results_text)
|
194 |
|
195 |
# Citation for the GitHub repo
|
196 |
st.markdown("<sub>This app was created by [Tonic](https://huggingface.co/tonic) with help from [MIND INTERFACES](https://huggingface.co/MIND-INTERFACES) & (Taylor)[https://huggingface.co/Cloudfaith] [join us on discord](https://discord.gg/5RmtZVVfgQ) </sub>", unsafe_allow_html=True)
|
|
|
72 |
st.info("Transcribing...")
|
73 |
st.success("Transcription complete")
|
74 |
result = model.transcribe(audio_file_path)
|
75 |
+
transcript = result['text'] # Define the 'transcript' variable
|
76 |
|
77 |
with st.expander("See transcript"):
|
78 |
st.markdown(transcript)
|
|
|
176 |
st.write(f"### Summary {i+1}")
|
177 |
st.write(summary)
|
178 |
|
179 |
+
# Display the Whisper transcription, extracted claims, and BERT summaries in a text box
|
180 |
+
if 'transcript' in locals() and 'claims_extracted' in st.session_state:
|
181 |
st.text("Transcription, Extracted Claims, and BERT Summaries:")
|
182 |
+
|
183 |
+
if 'transcript' in locals():
|
184 |
+
st.text("Transcription:")
|
185 |
+
st.text(transcript)
|
186 |
+
|
187 |
+
if 'claims_extracted' in st.session_state:
|
188 |
+
st.text("Extracted Claims:")
|
189 |
+
st.text(st.session_state.claims_extracted)
|
190 |
+
|
191 |
+
if summaries:
|
192 |
+
st.text("BERT Summaries:")
|
193 |
for i, summary in enumerate(summaries):
|
194 |
+
st.text(f"Summary {i + 1}:\n{summary}")
|
|
|
|
|
|
|
195 |
|
196 |
# Citation for the GitHub repo
|
197 |
st.markdown("<sub>This app was created by [Tonic](https://huggingface.co/tonic) with help from [MIND INTERFACES](https://huggingface.co/MIND-INTERFACES) & (Taylor)[https://huggingface.co/Cloudfaith] [join us on discord](https://discord.gg/5RmtZVVfgQ) </sub>", unsafe_allow_html=True)
|