MCPcopy Create free account
hub / github.com/MotrixLab/insactor / main

Function main

visualize.py:43–59  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

41
42
43def main():
44 tab_file_path, tab_direct_upload = st.tabs(["File Path", "Direct Upload"])
45
46 with tab_file_path:
47 file_path = st.text_input('Path to trajectory')
48 if os.path.isfile(file_path):
49 with open(file_path, 'rb') as f:
50 rollout_traj = np.load(f)
51 show_rollout_traj(rollout_traj, 'FP')
52 else:
53 st.warning('Please input a valid path', icon="⚠️")
54
55 with tab_direct_upload:
56 uploaded_file = st.file_uploader("Upload a trajectory")
57 if uploaded_file is not None:
58 rollout_traj = np.load(uploaded_file)
59 show_rollout_traj(rollout_traj, 'DU')
60
61
62if __name__ == '__main__':

Callers 1

visualize.pyFile · 0.70

Calls 1

show_rollout_trajFunction · 0.85

Tested by

no test coverage detected