NickVerri commited on
Commit
ccb78b5
·
verified ·
1 Parent(s): 8ccd7c9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -15
app.py CHANGED
@@ -5,6 +5,7 @@ import json
5
  import os
6
  import requests
7
  import torch
 
8
  from datetime import timedelta
9
  from pyannote.audio import Pipeline
10
  from huggingface_hub import hf_hub_download
@@ -193,18 +194,4 @@ if uploaded_file:
193
  # Diarization Preview to help the user identify roles
194
  with st.expander("Transcript Preview (Diarized)"):
195
  for seg in st.session_state.transcript[:20]: # Show first 20 segments
196
- st.write(f"**{seg['speaker']}:** {seg['text']}")
197
-
198
- brief = st.text_area("Creative Brief", placeholder="e.g. Focus on the yeast story, remove the interviewer.")
199
-
200
- if st.button("Step 2: Create EDL"):
201
- if not ACTIVE_GEMINI_KEY:
202
- st.error("Gemini API Key required. Please set it in Secrets or app.py.")
203
- else:
204
- with st.spinner("Analyzing..."):
205
- edl_segments = call_gemini_for_edl(st.session_state.transcript, brief, ACTIVE_GEMINI_KEY)
206
- if edl_segments:
207
- final_edl = generate_cmx_edl("AI_Senior_Editor_Cut", edl_segments, uploaded_file.name, fps)
208
- st.subheader("EDL Preview")
209
- st.code(final_edl, language="text")
210
- st.download_button("Download EDL", data=final_edl, file_name="edit.edl")
 
5
  import os
6
  import requests
7
  import torch
8
+ import numpy # Added missing import
9
  from datetime import timedelta
10
  from pyannote.audio import Pipeline
11
  from huggingface_hub import hf_hub_download
 
194
  # Diarization Preview to help the user identify roles
195
  with st.expander("Transcript Preview (Diarized)"):
196
  for seg in st.session_state.transcript[:20]: # Show first 20 segments
197
+ st.write(f"**{seg['speaker']}:** {seg