A streamlit extention to interact with Pollination Cloud
Project description
Streamlit Pollination
A collection of objects to facilitate working with Pollination in Streamlit.
Quickstart
import json
import pathlib
import hiplot
import numpy as np
import streamlit as st
from honeybee_vtk.model import HBModel, Model
from streamlit_pollination.selectors import job_selector
from streamlit_vtkjs import st_vtkjs
job = job_selector()
if job is not None:
df = job.runs_dataframe
st.markdown("## Runs Dataframe")
plt = hiplot.Experiment.from_dataframe(df)
plt.display_st()
run_number = st.select_slider(
'Select a run',
options=range(0, df.shape[0])
)
run_row = df.iloc[run_number]
model_path = run_row.model
model_dict = json.load(job.download_artifact(model_path))
hb_model = HBModel.from_dict(model_dict)
vtk_model = Model(hb_model)
key = run_row['run-id']
file = pathlib.Path(vtk_model.to_vtkjs('data', key))
st_vtkjs(file.read_bytes(), menu=True, key=key)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for streamlit-pollination-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c9f026dd6a0c1490add519998283a8b22f57e99f5ec737d5ff155eb066bbe59a |
|
MD5 | d5811e41718dcfcce8ebbcbd9a58d0f9 |
|
BLAKE2b-256 | 43b9d0575bec01231196f8484286597716656f704cd6e6d2b3f5ec8c765748f7 |
Close
Hashes for streamlit_pollination-0.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 72e27ac96d485e432e9bfa5eebefbe1a067b67186766cdb564ede2f57e2b9ccc |
|
MD5 | 42ca69a55a2e6e5024b0cb44e6e2724a |
|
BLAKE2b-256 | 216a0e924fdfb79cbe420d03363cd3d22c6a8449b797521a40e93519cb9ec278 |