Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -541,6 +541,25 @@ def generate_visual_timeline(timeline: List[Dict], video_path: str) -> str:
|
|
| 541 |
color: #d32f2f;
|
| 542 |
font-style: italic;
|
| 543 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 544 |
</style>
|
| 545 |
<div class="timeline-container">
|
| 546 |
"""
|
|
@@ -594,13 +613,12 @@ def generate_visual_timeline(timeline: List[Dict], video_path: str) -> str:
|
|
| 594 |
html += f'<div class="timeline-error">{text}</div>'
|
| 595 |
else:
|
| 596 |
html += f'<div class="timeline-summary">{summary}</div>'
|
| 597 |
-
html += f'
|
| 598 |
-
|
| 599 |
-
|
| 600 |
-
|
| 601 |
-
|
| 602 |
-
|
| 603 |
-
html += '</div>'
|
| 604 |
|
| 605 |
html += """
|
| 606 |
</div>
|
|
@@ -688,4 +706,4 @@ if __name__ == "__main__":
|
|
| 688 |
print("❌ FFmpeg not available")
|
| 689 |
|
| 690 |
demo = create_interface()
|
| 691 |
-
demo.launch(debug=True)
|
|
|
|
| 541 |
color: #d32f2f;
|
| 542 |
font-style: italic;
|
| 543 |
}
|
| 544 |
+
.timeline-transcript {
|
| 545 |
+
margin: 8px 0;
|
| 546 |
+
}
|
| 547 |
+
.transcript-toggle {
|
| 548 |
+
cursor: pointer;
|
| 549 |
+
color: #39739d;
|
| 550 |
+
font-weight: 500;
|
| 551 |
+
padding: 4px 0;
|
| 552 |
+
}
|
| 553 |
+
.transcript-toggle:hover {
|
| 554 |
+
color: #2c5aa0;
|
| 555 |
+
}
|
| 556 |
+
.timeline-transcript[open] .timeline-text {
|
| 557 |
+
margin-top: 8px;
|
| 558 |
+
padding: 10px;
|
| 559 |
+
background-color: #f8f9fa;
|
| 560 |
+
border-radius: 4px;
|
| 561 |
+
border-left: 3px solid #39739d;
|
| 562 |
+
}
|
| 563 |
</style>
|
| 564 |
<div class="timeline-container">
|
| 565 |
"""
|
|
|
|
| 613 |
html += f'<div class="timeline-error">{text}</div>'
|
| 614 |
else:
|
| 615 |
html += f'<div class="timeline-summary">{summary}</div>'
|
| 616 |
+
html += f'''
|
| 617 |
+
<details class="timeline-transcript">
|
| 618 |
+
<summary class="transcript-toggle">📝 View Full Transcription</summary>
|
| 619 |
+
<div class="timeline-text">{text}</div>
|
| 620 |
+
</details>
|
| 621 |
+
'''
|
|
|
|
| 622 |
|
| 623 |
html += """
|
| 624 |
</div>
|
|
|
|
| 706 |
print("❌ FFmpeg not available")
|
| 707 |
|
| 708 |
demo = create_interface()
|
| 709 |
+
demo.launch(debug=True)
|