Spaces:
Build error
Build error
Miquel Farre
commited on
Commit
·
21888ca
1
Parent(s):
bfcc0a3
fixes
Browse files
app.py
CHANGED
|
@@ -258,21 +258,21 @@ def create_ui(examples_path: str, model_path: str):
|
|
| 258 |
]
|
| 259 |
|
| 260 |
yield [
|
|
|
|
| 261 |
"Initializing video highlight detector...",
|
| 262 |
"",
|
| 263 |
"",
|
| 264 |
-
gr.update(visible=False),
|
| 265 |
gr.update(visible=False)
|
| 266 |
]
|
| 267 |
|
| 268 |
detector = VideoHighlightDetector(model_path=model_path)
|
| 269 |
|
| 270 |
yield [
|
|
|
|
| 271 |
"Analyzing video content...",
|
| 272 |
"",
|
| 273 |
"",
|
| 274 |
-
gr.update(visible=False)
|
| 275 |
-
gr.update(visible=True)
|
| 276 |
]
|
| 277 |
|
| 278 |
# Analyze video content
|
|
@@ -280,10 +280,10 @@ def create_ui(examples_path: str, model_path: str):
|
|
| 280 |
formatted_desc = f"### Video Summary:\n{video_desc}"
|
| 281 |
|
| 282 |
yield [
|
|
|
|
| 283 |
"Determining highlight types...",
|
| 284 |
formatted_desc,
|
| 285 |
"",
|
| 286 |
-
gr.update(visible=False),
|
| 287 |
gr.update(visible=True)
|
| 288 |
]
|
| 289 |
|
|
@@ -304,10 +304,10 @@ def create_ui(examples_path: str, model_path: str):
|
|
| 304 |
progress = int((segments_processed / total_segments) * 100)
|
| 305 |
|
| 306 |
yield [
|
|
|
|
| 307 |
f"Processing segments... {progress}% complete",
|
| 308 |
formatted_desc,
|
| 309 |
formatted_highlights,
|
| 310 |
-
gr.update(visible=False),
|
| 311 |
gr.update(visible=True)
|
| 312 |
]
|
| 313 |
|
|
|
|
| 258 |
]
|
| 259 |
|
| 260 |
yield [
|
| 261 |
+
None,
|
| 262 |
"Initializing video highlight detector...",
|
| 263 |
"",
|
| 264 |
"",
|
|
|
|
| 265 |
gr.update(visible=False)
|
| 266 |
]
|
| 267 |
|
| 268 |
detector = VideoHighlightDetector(model_path=model_path)
|
| 269 |
|
| 270 |
yield [
|
| 271 |
+
None,
|
| 272 |
"Analyzing video content...",
|
| 273 |
"",
|
| 274 |
"",
|
| 275 |
+
gr.update(visible=False)
|
|
|
|
| 276 |
]
|
| 277 |
|
| 278 |
# Analyze video content
|
|
|
|
| 280 |
formatted_desc = f"### Video Summary:\n{video_desc}"
|
| 281 |
|
| 282 |
yield [
|
| 283 |
+
None,
|
| 284 |
"Determining highlight types...",
|
| 285 |
formatted_desc,
|
| 286 |
"",
|
|
|
|
| 287 |
gr.update(visible=True)
|
| 288 |
]
|
| 289 |
|
|
|
|
| 304 |
progress = int((segments_processed / total_segments) * 100)
|
| 305 |
|
| 306 |
yield [
|
| 307 |
+
None,
|
| 308 |
f"Processing segments... {progress}% complete",
|
| 309 |
formatted_desc,
|
| 310 |
formatted_highlights,
|
|
|
|
| 311 |
gr.update(visible=True)
|
| 312 |
]
|
| 313 |
|