Spaces:
Build error
Build error
Commit
·
7538ea8
1
Parent(s):
a705e20
update
Browse files
app.py
CHANGED
|
@@ -1,5 +1,6 @@
|
|
| 1 |
import streamlit as st
|
| 2 |
from datasets import load_dataset
|
|
|
|
| 3 |
|
| 4 |
# Load the dataset in streaming mode
|
| 5 |
dataset = load_dataset("giobin/MAIA_2400", streaming=True)
|
|
@@ -9,7 +10,7 @@ dataset_iter = iter(dataset["train"]) # Adjust split name if needed
|
|
| 9 |
|
| 10 |
# Fetch the first video example
|
| 11 |
video_example = next(dataset_iter)
|
| 12 |
-
|
| 13 |
|
| 14 |
# Display the video
|
| 15 |
-
st.video(
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
from datasets import load_dataset
|
| 3 |
+
import tempfile
|
| 4 |
|
| 5 |
# Load the dataset in streaming mode
|
| 6 |
dataset = load_dataset("giobin/MAIA_2400", streaming=True)
|
|
|
|
| 10 |
|
| 11 |
# Fetch the first video example
|
| 12 |
video_example = next(dataset_iter)
|
| 13 |
+
video_reader = video_example["video"] # Decord VideoReader object
|
| 14 |
|
| 15 |
# Display the video
|
| 16 |
+
st.video(video_reader[:].asnumpy().tobytes())
|