Spaces:
Build error
Build error
Update app.py
Browse files14 unmodified lines151617181920212223242526272829303132339 unmodified lines434445464748170 unmodified lines21922022122222322422596 unmodified lines322323324325326327328329330190 unmodified lines52152252352452552652745 unmodified lines57357457557657757857948 unmodified lines62862963063163263363414 unmodified linesfrom download import download_video_audio, delete_downloadfrom st_audiorec import st_audiorec # Import the audio recorder componentst.set_page_config(page_title="Meeting Notes",page_icon="π§ββοΈ",layout="wide",initial_sidebar_state="expanded")# Set max file size for audio uploads (40MB)MAX_FILE_SIZE = 41943040 # 40MBFILE_TOO_LARGE_MESSAGE = "File too large. Maximum size is 40MB."# Load environment variables - will also load from Hugging Face secretsload_dotenv()# Initialize session states9 unmodified linesif 'transcription_error' not in st.session_state:st.session_state.transcription_error = None# Fixed model selectionsLLM_MODEL = "deepseek-r1-distill-llama-70b"TRANSCRIPTION_MODEL = "distil-whisper-large-v3-en"170 unmodified lines# Inform user of retry attemptst.info(f"Retrying transcription... (Attempt {tries}/{max_tries})")time.sleep(wait_with_jitter)return wrapperreturn decorator96 unmodified linesPlease analyze the following transcript and transform it into highly organized notes:```{transcript}```Create a well-structured document with the following sections:# Executive Summary190 unmodified lines# Add a button to transcribe the recorded audioif st.button("Transcribe Recording", key="transcribe_rec"):with st.spinner("Transcribing audio ....."):try:transcript = transcribe_audio_with_groq(wav_audio_data)if transcript:45 unmodified lines# Reset any previous transcription errorsst.session_state.transcription_error = Nonewith st.spinner("Transcribing audio ....."):try:transcript = transcribe_audio_with_groq(audio_file_path)if transcript:48 unmodified linesst.success("Video downloaded successfully!")st.audio(audio_path)with st.spinner("Transcribing audio ....."):try:transcript = transcribe_audio_with_groq(audio_path)if transcript:14 unmodified lines15161718192021222324259 unmodified lines3536373839404142434445464748170 unmodified lines21922022122222322422522696 unmodified lines323324325326327328329330331332333334190 unmodified lines52552652752852953053145 unmodified lines57757857958058158258348 unmodified lines63263363463563663763814 unmodified linesfrom download import download_video_audio, delete_downloadfrom st_audiorec import st_audiorec # Import the audio recorder component# Set max file size for audio uploads (40MB)MAX_FILE_SIZE = 41943040 # 40MBFILE_TOO_LARGE_MESSAGE = "File too large. Maximum size is 40MB."# Load environment variables - will also load from Hugging Face secretsload_dotenv()# Initialize session states9 unmodified linesif 'transcription_error' not in st.session_state:st.session_state.transcription_error = None# Set page configurationst.set_page_config(page_title="ScribeWizard π§ββοΈ",page_icon="π§ββοΈ",layout="wide",initial_sidebar_state="expanded")# Fixed model selectionsLLM_MODEL = "deepseek-r1-distill-llama-70b"TRANSCRIPTION_MODEL = "distil-whisper-large-v3-en"170 unmodified lines# Inform user of retry attemptst.info(f"Retrying transcription... (Attempt {tries}/{max_tries})")time.sleep(wait_with_jitter)return None # This line should never be reached but is added to satisfy the function signaturereturn wrapperreturn decorator96 unmodified linesPlease analyze the following transcript and transform it into highly organized notes:```{transcript}```Create a well-structured document with the following sections:# Executive Summary190 unmodified lines# Add a button to transcribe the recorded audioif st.button("Transcribe Recording", key="transcribe_rec"):with st.spinner("Transcribing audio with Groq..."):try:transcript = transcribe_audio_with_groq(wav_audio_data)if transcript:45 unmodified lines# Reset any previous transcription errorsst.session_state.transcription_error = Nonewith st.spinner("Transcribing audio with Groq..."):try:transcript = transcribe_audio_with_groq(audio_file_path)if transcript:48 unmodified linesst.success("Video downloaded successfully!")st.audio(audio_path)with st.spinner("Transcribing audio with Groq..."):try:transcript = transcribe_audio_with_groq(audio_path)if transcript:
app.py+17-13