Spaces:
Build error
Build error
LethallyHealthy
commited on
Commit
·
2b1d5a0
1
Parent(s):
60c06b1
Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
#import the necessary dependencies
|
2 |
import streamlit as st
|
3 |
-
import streamlit.components.v1 as
|
4 |
import shap
|
5 |
import numpy as np
|
6 |
import pandas as pd
|
@@ -45,7 +45,7 @@ with st.sidebar:
|
|
45 |
from streamlit import components
|
46 |
def st_shap(plot, height=None):
|
47 |
shap_html = f"<head>{shap.getjs()}</head><body>{plot.html()}</body>"
|
48 |
-
|
49 |
|
50 |
#The button
|
51 |
if st.button("Calculate Your House Price!"):
|
|
|
1 |
#import the necessary dependencies
|
2 |
import streamlit as st
|
3 |
+
import streamlit.components.v1 as cmpnts
|
4 |
import shap
|
5 |
import numpy as np
|
6 |
import pandas as pd
|
|
|
45 |
from streamlit import components
|
46 |
def st_shap(plot, height=None):
|
47 |
shap_html = f"<head>{shap.getjs()}</head><body>{plot.html()}</body>"
|
48 |
+
cmpnts.html(shap_html, height=height)
|
49 |
|
50 |
#The button
|
51 |
if st.button("Calculate Your House Price!"):
|