Spaces:
Build error
Build error
Minor
Browse files
app.py
CHANGED
|
@@ -165,7 +165,12 @@ if __name__ == "__main__":
|
|
| 165 |
num_foley_segments = np.sum(num_foley_per_clip)
|
| 166 |
data = [d for d, n in zip(data, num_foley_per_clip) if n > 0]
|
| 167 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 168 |
# store variables
|
|
|
|
| 169 |
st.session_state.video_ids = video_ids
|
| 170 |
st.session_state.data = data
|
| 171 |
st.session_state.num_foley_segments = num_foley_segments
|
|
@@ -190,7 +195,7 @@ if __name__ == "__main__":
|
|
| 190 |
) for i in range(len(annot["non_speech_segments"]))
|
| 191 |
]
|
| 192 |
segments, durations = annot["non_speech_segments"], annot["duration"]
|
| 193 |
-
movie =
|
| 194 |
|
| 195 |
|
| 196 |
st.markdown(f"Showing Foley segments from a clip in movie: **{movie}**")
|
|
|
|
| 165 |
num_foley_segments = np.sum(num_foley_per_clip)
|
| 166 |
data = [d for d, n in zip(data, num_foley_per_clip) if n > 0]
|
| 167 |
|
| 168 |
+
# get movie titles
|
| 169 |
+
df = pd.read_csv(csv_path)
|
| 170 |
+
titles = df["title"].values
|
| 171 |
+
|
| 172 |
# store variables
|
| 173 |
+
st.session_state.titles = titles
|
| 174 |
st.session_state.video_ids = video_ids
|
| 175 |
st.session_state.data = data
|
| 176 |
st.session_state.num_foley_segments = num_foley_segments
|
|
|
|
| 195 |
) for i in range(len(annot["non_speech_segments"]))
|
| 196 |
]
|
| 197 |
segments, durations = annot["non_speech_segments"], annot["duration"]
|
| 198 |
+
movie = st.session_state.titles[index]
|
| 199 |
|
| 200 |
|
| 201 |
st.markdown(f"Showing Foley segments from a clip in movie: **{movie}**")
|