Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -7,6 +7,33 @@ from streamlit_image_comparison import image_comparison
|
|
7 |
|
8 |
st.set_page_config(layout="wide")
|
9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
# HIN Number +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
11 |
from SPARQLWrapper import SPARQLWrapper, JSON
|
12 |
from streamlit_agraph import agraph, TripleStore, Node, Edge, Config
|
@@ -181,6 +208,9 @@ with tab2:
|
|
181 |
with tab3:
|
182 |
|
183 |
st.header("Control Room")
|
|
|
|
|
|
|
184 |
|
185 |
"""
|
186 |
Smart meters
|
|
|
7 |
|
8 |
st.set_page_config(layout="wide")
|
9 |
|
10 |
+
|
11 |
+
# Animation Code +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
12 |
+
|
13 |
+
# Set up the duration for your animation
|
14 |
+
t0=0 # [hrs]
|
15 |
+
t_end=2 # [hrs]
|
16 |
+
dt=0.005 # [hrs]
|
17 |
+
# Create array for time
|
18 |
+
t=np.arange(t0,t_end+dt,dt)
|
19 |
+
|
20 |
+
box_object=dict(boxstyle='circle',fc=(0.1,0.9,0.9),ec='r',lw=10)
|
21 |
+
stopwatch0=ax0.text(1400,0.65,'',size=20,color='g',bbox=box_object)
|
22 |
+
|
23 |
+
def update_plot(num):
|
24 |
+
|
25 |
+
# 1st subplot
|
26 |
+
|
27 |
+
stopwatch0.set_text(str(round(t[num],1))+' hrs')
|
28 |
+
|
29 |
+
return stopwatch0,
|
30 |
+
|
31 |
+
|
32 |
+
|
33 |
+
|
34 |
+
# Subplot 1
|
35 |
+
ax0=fig.add_subplot(gs[0,:],facecolor=(0.9,0.9,0.9))
|
36 |
+
|
37 |
# HIN Number +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
38 |
from SPARQLWrapper import SPARQLWrapper, JSON
|
39 |
from streamlit_agraph import agraph, TripleStore, Node, Edge, Config
|
|
|
208 |
with tab3:
|
209 |
|
210 |
st.header("Control Room")
|
211 |
+
fig2=plt.figure(figsize=(16,9),dpi=120,facecolor=(0.8,0.8,0.8))
|
212 |
+
gs=gridspec.GridSpec(2,2)
|
213 |
+
st.pyplot(fig2)
|
214 |
|
215 |
"""
|
216 |
Smart meters
|