Spaces:
Runtime error
Runtime error
Miquel Farre
commited on
Commit
·
9ae4b34
1
Parent(s):
9477e3d
debug
Browse files
app.py
CHANGED
|
@@ -138,7 +138,7 @@ class VideoHighlightDetector:
|
|
| 138 |
|
| 139 |
outputs = self.model.generate(**inputs, max_new_tokens=64, do_sample=False)
|
| 140 |
response = self.processor.decode(outputs[0], skip_special_tokens=True).lower().split("assistant: ")[1]
|
| 141 |
-
|
| 142 |
return "yes" in response
|
| 143 |
|
| 144 |
def _concatenate_scenes(
|
|
@@ -350,6 +350,7 @@ def create_ui(examples_path: str, model_path: str):
|
|
| 350 |
|
| 351 |
# Process segment
|
| 352 |
if detector.process_segment(segment_path, highlights):
|
|
|
|
| 353 |
kept_segments.append((start_time, end_time))
|
| 354 |
|
| 355 |
# Clean up segment file
|
|
|
|
| 138 |
|
| 139 |
outputs = self.model.generate(**inputs, max_new_tokens=64, do_sample=False)
|
| 140 |
response = self.processor.decode(outputs[0], skip_special_tokens=True).lower().split("assistant: ")[1]
|
| 141 |
+
print(f"Segment response {response}")
|
| 142 |
return "yes" in response
|
| 143 |
|
| 144 |
def _concatenate_scenes(
|
|
|
|
| 350 |
|
| 351 |
# Process segment
|
| 352 |
if detector.process_segment(segment_path, highlights):
|
| 353 |
+
print("KEEPING SEGMENT")
|
| 354 |
kept_segments.append((start_time, end_time))
|
| 355 |
|
| 356 |
# Clean up segment file
|