Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -11,7 +11,7 @@ import matplotlib as mpl
|
|
| 11 |
|
| 12 |
import numpy as np
|
| 13 |
import streamlit as st
|
| 14 |
-
import plotly.
|
| 15 |
|
| 16 |
# For measuring the inference time.
|
| 17 |
import time
|
|
@@ -34,7 +34,7 @@ def main():
|
|
| 34 |
if st.button("Prediction"):
|
| 35 |
# plot pca cluster plot
|
| 36 |
plot = plot_model(kmeans, plot = 'cluster', save = True)
|
| 37 |
-
fig =
|
| 38 |
st.plotly_chart(fig)
|
| 39 |
|
| 40 |
if __name__ == '__main__':
|
|
|
|
| 11 |
|
| 12 |
import numpy as np
|
| 13 |
import streamlit as st
|
| 14 |
+
import plotly.io as pio
|
| 15 |
|
| 16 |
# For measuring the inference time.
|
| 17 |
import time
|
|
|
|
| 34 |
if st.button("Prediction"):
|
| 35 |
# plot pca cluster plot
|
| 36 |
plot = plot_model(kmeans, plot = 'cluster', save = True)
|
| 37 |
+
fig = pio.from_json(plot)
|
| 38 |
st.plotly_chart(fig)
|
| 39 |
|
| 40 |
if __name__ == '__main__':
|