Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -73,7 +73,7 @@ class YouTubeDownloader:
|
|
73 |
1. Create detailed scene descriptions that include:
|
74 |
- Physical appearance of people (age, gender, clothing, hair, etc.)
|
75 |
- Exact actions being performed
|
76 |
-
- Dialogue or speech (actual lines
|
77 |
- Setting and environment details
|
78 |
- Props, objects, or products being shown
|
79 |
- Visual effects, text overlays, or graphics
|
@@ -117,20 +117,15 @@ class YouTubeDownloader:
|
|
117 |
|
118 |
for line in lines:
|
119 |
line = line.strip()
|
120 |
-
if line.startswith('**[
|
121 |
# This is a new scene timestamp line
|
122 |
if current_scene:
|
123 |
scenes.append(current_scene.strip())
|
124 |
-
current_scene = line
|
125 |
-
elif current_scene
|
126 |
# This is continuation of the current scene description
|
127 |
-
current_scene += "
|
128 |
-
|
129 |
-
# Alternative format handling
|
130 |
-
if current_scene:
|
131 |
-
scenes.append(current_scene.strip())
|
132 |
-
current_scene = line
|
133 |
-
|
134 |
# Add the last scene if exists
|
135 |
if current_scene:
|
136 |
scenes.append(current_scene.strip())
|
|
|
73 |
1. Create detailed scene descriptions that include:
|
74 |
- Physical appearance of people (age, gender, clothing, hair, etc.)
|
75 |
- Exact actions being performed
|
76 |
+
- Dialogue or speech (include actual lines if audible, or infer probable spoken lines based on actions and setting; format them as "Character: line...")
|
77 |
- Setting and environment details
|
78 |
- Props, objects, or products being shown
|
79 |
- Visual effects, text overlays, or graphics
|
|
|
117 |
|
118 |
for line in lines:
|
119 |
line = line.strip()
|
120 |
+
if line.strip().startswith('**[") and "]**:' in line:
|
121 |
# This is a new scene timestamp line
|
122 |
if current_scene:
|
123 |
scenes.append(current_scene.strip())
|
124 |
+
current_scene = line.strip()
|
125 |
+
elif current_scene:
|
126 |
# This is continuation of the current scene description
|
127 |
+
current_scene += "\n" + line.strip()
|
128 |
+
|
|
|
|
|
|
|
|
|
|
|
129 |
# Add the last scene if exists
|
130 |
if current_scene:
|
131 |
scenes.append(current_scene.strip())
|