-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpreview_approved.py
28 lines (17 loc) · 990 Bytes
/
preview_approved.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
from magnetron import display_rows_with_editing, fetch_and_filter_data
import streamlit as st
import pandas as pd
import json
import yaml
st.set_page_config(layout="wide")
st.header("Steerable Motion Dataset")
st.markdown("***")
with st.sidebar:
st.subheader("Download dataset")
st.write("This is the output of the Steerable Motion training data collection process. You can read more about Steerable Motion [here](https://steerablemotion.com) and find the repo for the data collection tool [here](https://github.com/banodoco/magnetron).")
def convert_df(df):
return df.to_csv(index=False).encode('utf-8')
df = fetch_and_filter_data(statuses=['approved'])[['video_id', 'uuid', 'image_0_location', 'image_1_location', 'caption', 'image_0_frame_number', 'image_1_frame_number']]
csv = convert_df(df)
st.download_button("Download Data", csv, "file.csv", "text/csv", key='download-csv')
display_rows_with_editing(status='approved', allow_action=False)