pgleeson commited on
Commit
fb2ef52
·
1 Parent(s): d1aa2ae

Check xvfb

Browse files
Files changed (1) hide show
  1. app.py +6 -0
app.py CHANGED
@@ -6,6 +6,12 @@ from stpyvista import stpyvista
6
  st.title("A cube")
7
  st.info("""Code adapted from https://docs.pyvista.org/user-guide/jupyter/pythreejs.html#scalars-support""")
8
 
 
 
 
 
 
 
9
  ## Initialize a plotter object
10
  plotter = pv.Plotter(window_size=[400,400])
11
 
 
6
  st.title("A cube")
7
  st.info("""Code adapted from https://docs.pyvista.org/user-guide/jupyter/pythreejs.html#scalars-support""")
8
 
9
+ from stpyvista.utils import start_xvfb
10
+
11
+ if "IS_XVFB_RUNNING" not in st.session_state:
12
+ start_xvfb()
13
+ st.session_state.IS_XVFB_RUNNING = True
14
+
15
  ## Initialize a plotter object
16
  plotter = pv.Plotter(window_size=[400,400])
17