add new examples for jupyter and streamlit

This commit is contained in:
nicolalandro
2021-11-21 14:03:30 +01:00
parent c0f36f29fc
commit 9eda4a57fa
4 changed files with 217 additions and 2 deletions

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,10 @@
import streamlit as st
import streamlit.components.v1 as components
from obj2html import obj2html
# run in the root folder, not inside exaples, to have the relative path working
obj_path = "test/assets/model.obj"
html_string = obj2html(obj_path, html_elements_only=True)
components.html(html_string)
with open(obj_path) as f:
st.download_button('Download model.obj', f, file_name="model.obj")