Spaces:
Runtime error
Runtime error
File size: 268 Bytes
dd0ef30 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
import streamlit as st
import numpy as np
import matplotlib.pyplot as plt
@st.experimental_memo
def load_fig():
arr = np.random.normal(1, 1, size=100)
fig, ax = plt.subplots()
ax.hist(arr, bins=20)
return fig, ax
fig, ax = load_fig()
st.pyplot(fig)
|