Spaces:
Runtime error
Runtime error
| import streamlit as st | |
| from visualize import plotSurface | |
| from DecisionTree import predictor | |
| def md_contents(): | |
| collapse_content = """ | |
| <details> | |
| <summary>Getting started</summary> | |
| <a href="https://mp.weixin.qq.com/s/OFoTbEcvbe-k3Ys-wTStPA">streamlit ๆ็ฎๅ ฅ้จ</a> | |
| </details> | |
| <details> | |
| <summary>Additional knowledge</summary> | |
| <a href="https://mp.weixin.qq.com/s/74ehblIzwe4rmCM6K-ynEA">ๅณ็ญๆ ็ๅฏ่งๅ</a> | |
| </details> | |
| """ | |
| st.title("ๅณ็ญๆ ่ฅฟ็ๆ้ๅจ") | |
| st.markdown(collapse_content, unsafe_allow_html=True) | |
| def body(): | |
| predictor() | |
| st.markdown("---") | |
| st.write("Source Code") | |
| with st.expander("data.py", expanded=False): | |
| with open("data.py", encoding="UTF-8") as f: | |
| st.code(f.read(), language="python") | |
| with st.expander("DecisionTree.py", expanded=False): | |
| with open("DecisionTree.py", encoding="UTF-8") as f: | |
| st.code(f.read(), language="python") | |
| with st.expander("visualize.py", expanded=False): | |
| with open("visualize.py", encoding="UTF-8") as f: | |
| st.code(f.read(), language="python") | |
| if st.checkbox("decisionTreeViz"): | |
| # viz = decisionTreeViz(model) | |
| # svg = viz.svg() | |
| # svg_write(svg) | |
| ps=plotSurface() | |
| if __name__ == '__main__': | |
| md_contents() | |
| body() |