Update app.py
Browse files
app.py
CHANGED
|
@@ -241,7 +241,7 @@ def generate_xml(sequence_name, segments, source_name, fps=25, start_offset=0.0)
|
|
| 241 |
lines.append(f'\t\t\t\t\t<end>{tl_end}</end>')
|
| 242 |
lines.append(f'\t\t\t\t\t<in>{src_in_frames}</in>')
|
| 243 |
lines.append(f'\t\t\t\t\t<out>{src_out_frames}</out>')
|
| 244 |
-
lines.append('\t\t\t\t\t<sourcetrack><mediatype>audio</mediatype><trackindex>1</trackindex></
|
| 245 |
lines.append('\t\t\t\t</clipitem>')
|
| 246 |
timeline_head_frames = tl_end + seconds_to_frames(seg.get('gap', 0.0), fps)
|
| 247 |
|
|
@@ -258,7 +258,7 @@ def call_gemini_for_edl(transcript_data, story_prompt, api_key):
|
|
| 258 |
st.error("Gemini API Key is missing.")
|
| 259 |
return None
|
| 260 |
|
| 261 |
-
url = f"https://generativelanguage.googleapis.com/v1beta/models/gemini-
|
| 262 |
|
| 263 |
system_prompt = (
|
| 264 |
"You are an expert Documentary Senior Editor. Use the provided transcript JSON "
|
|
|
|
| 241 |
lines.append(f'\t\t\t\t\t<end>{tl_end}</end>')
|
| 242 |
lines.append(f'\t\t\t\t\t<in>{src_in_frames}</in>')
|
| 243 |
lines.append(f'\t\t\t\t\t<out>{src_out_frames}</out>')
|
| 244 |
+
lines.append('\t\t\t\t\t<sourcetrack><mediatype>audio</mediatype><trackindex>1</trackindex></souretrack>')
|
| 245 |
lines.append('\t\t\t\t</clipitem>')
|
| 246 |
timeline_head_frames = tl_end + seconds_to_frames(seg.get('gap', 0.0), fps)
|
| 247 |
|
|
|
|
| 258 |
st.error("Gemini API Key is missing.")
|
| 259 |
return None
|
| 260 |
|
| 261 |
+
url = f"https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash:generateContent?key={api_key}"
|
| 262 |
|
| 263 |
system_prompt = (
|
| 264 |
"You are an expert Documentary Senior Editor. Use the provided transcript JSON "
|