ericbotti/transcript-notetaker
0
1# 3rd party - located in requirements.txt2import streamlit as st3# local4import summarizer5 6st.set_page_config(page_title='Transcript Notetaker', page_icon=':memo:', layout='wide')7 8# App Content9'''10# Transcript Notetaker11 12Upload a transcript of a Google Meet call and this app will use the OpenAI API to generate detailed notes for the meeting.13 14_This program was designed to work with the transcript documents automatically generated by Google Meet meetings, using 15transcripts with a different format may result in unexpected behavior._ 16'''17 18api_key = st.text_input("Enter your OpenAI API key", type='password')19 20uploaded_file = st.file_uploader('Upload your Transcript', type='.txt')21 22if api_key and uploaded_file:23 create_notes_button_disabled = False24 create_notes_button_help = ''25else:26 create_notes_button_disabled = True27 create_notes_button_help = "Enter your API key and upload a file to continue"28 29button_create_notes = st.button("Create Notes", disabled=create_notes_button_disabled, help=create_notes_button_help)30 31meeting_notes = None32 33if button_create_notes:34 35 header, transcript = summarizer.load_transcript(uploaded_file)36 37 chunks = summarizer.chunk_transcript(transcript)38 39 summaries = summarizer.summarize_chunks(chunks, api_key)40 41 meeting_notes = summarizer.format_notes(summaries, header)42 43if meeting_notes:44 st.divider()45 46 st.download_button("Download Notes", meeting_notes, "notes.md")47 48 st.markdown(meeting_notes)49 50 