Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -98,8 +98,8 @@ def main():
|
|
| 98 |
elif input_type == "YouTube URL":
|
| 99 |
youtube_input = st.sidebar.text_input("Enter YouTube URL (must have subtitles enabled)", key="youtube")
|
| 100 |
|
| 101 |
-
#
|
| 102 |
-
if st.button("Generate Notes", key="generate_notes"):
|
| 103 |
transcription_text = ""
|
| 104 |
if input_type == "Audio File" and audio_input:
|
| 105 |
transcription = transcribe_audio(audio_input)
|
|
@@ -125,8 +125,26 @@ def main():
|
|
| 125 |
if 'summary' in st.session_state:
|
| 126 |
st.markdown("---")
|
| 127 |
st.subheader("Generated Notes")
|
| 128 |
-
|
| 129 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 130 |
|
| 131 |
if __name__ == "__main__":
|
| 132 |
main()
|
|
|
|
| 98 |
elif input_type == "YouTube URL":
|
| 99 |
youtube_input = st.sidebar.text_input("Enter YouTube URL (must have subtitles enabled)", key="youtube")
|
| 100 |
|
| 101 |
+
# Place Generate Notes button in the sidebar
|
| 102 |
+
if st.sidebar.button("Generate Notes", key="generate_notes"):
|
| 103 |
transcription_text = ""
|
| 104 |
if input_type == "Audio File" and audio_input:
|
| 105 |
transcription = transcribe_audio(audio_input)
|
|
|
|
| 125 |
if 'summary' in st.session_state:
|
| 126 |
st.markdown("---")
|
| 127 |
st.subheader("Generated Notes")
|
| 128 |
+
summary = st.session_state['summary']
|
| 129 |
+
|
| 130 |
+
st.markdown("### Summary:")
|
| 131 |
+
st.markdown(f"<div style='background-color: black; color: white; padding: 10px; border-radius: 5px;'>" +
|
| 132 |
+
f"<p>{summary}</p>" +
|
| 133 |
+
"</div>", unsafe_allow_html=True)
|
| 134 |
+
|
| 135 |
+
st.markdown("### Learning Outcomes:")
|
| 136 |
+
st.markdown("<div style='background-color: black; color: white; padding: 10px; border-radius: 5px;'>" +
|
| 137 |
+
"<ul>" +
|
| 138 |
+
"<li>Understand key points discussed in the lecture.</li>" +
|
| 139 |
+
"<li>Be able to explain concepts with clarity.</li>" +
|
| 140 |
+
"<li>Implement ideas in practical scenarios.</li>" +
|
| 141 |
+
"</ul>" +
|
| 142 |
+
"</div>", unsafe_allow_html=True)
|
| 143 |
+
|
| 144 |
+
st.markdown("### Lecture Slides:")
|
| 145 |
+
st.markdown("<div style='background-color: black; color: white; padding: 10px; border-radius: 5px;'>" +
|
| 146 |
+
"<p>Click here to upload or access slides.</p>" +
|
| 147 |
+
"</div>", unsafe_allow_html=True)
|
| 148 |
|
| 149 |
if __name__ == "__main__":
|
| 150 |
main()
|