Spaces:
Runtime error
Runtime error
Commit
•
1a19328
1
Parent(s):
6919d1a
Update app.py
Browse files
app.py
CHANGED
@@ -5,11 +5,8 @@ import matplotlib.pyplot as plt
|
|
5 |
import matplotlib as ml
|
6 |
import streamlit as st
|
7 |
import math
|
8 |
-
|
9 |
st.title('Schematic Design')
|
10 |
-
@st.experimental_singleton
|
11 |
-
def im():
|
12 |
-
return ml.image.imread("bandar1.png")
|
13 |
|
14 |
|
15 |
tanasobat=crt.Antecedent(np.arange(0,3.05,0.05),'c')
|
@@ -19,7 +16,7 @@ feshordegi=crt.Antecedent(np.arange(0,1,0.01),'d')
|
|
19 |
ertefa=crt.Antecedent(np.arange(2.3,10.001,0.001),'e')
|
20 |
WWR=crt.Antecedent(np.arange(0,1.001,0.001),'f')
|
21 |
emtiaz_HH=crt.Consequent(np.arange(-4,24.01,0.01),'score')
|
22 |
-
g1=st.sidebar.radio('climate',['hot and humid'])
|
23 |
jahat['low']=fuzz.trimf(jahat.universe,[0,5,12])
|
24 |
jahat['medium']=fuzz.trimf(jahat.universe,[5,12,17.5])
|
25 |
jahat['re_hight']=fuzz.trimf(jahat.universe,[12,17.5,25])
|
@@ -201,21 +198,30 @@ f1=cs1.input['f']=st.sidebar.slider("wwr",min_value=0.00,max_value=1.00,step=0.0
|
|
201 |
cs1.compute()
|
202 |
g11=cs1.output['score']
|
203 |
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
219 |
st.header('your score is :')
|
220 |
st.header(g11)
|
221 |
st.set_option('deprecation.showPyplotGlobalUse', False)
|
|
|
5 |
import matplotlib as ml
|
6 |
import streamlit as st
|
7 |
import math
|
8 |
+
from mpl_toolkits.mplot3d import Axes3D
|
9 |
st.title('Schematic Design')
|
|
|
|
|
|
|
10 |
|
11 |
|
12 |
tanasobat=crt.Antecedent(np.arange(0,3.05,0.05),'c')
|
|
|
16 |
ertefa=crt.Antecedent(np.arange(2.3,10.001,0.001),'e')
|
17 |
WWR=crt.Antecedent(np.arange(0,1.001,0.001),'f')
|
18 |
emtiaz_HH=crt.Consequent(np.arange(-4,24.01,0.01),'score')
|
19 |
+
g1=st.sidebar.radio('climate',['hot and humid','hot and dry','cold','moderate and humid'])
|
20 |
jahat['low']=fuzz.trimf(jahat.universe,[0,5,12])
|
21 |
jahat['medium']=fuzz.trimf(jahat.universe,[5,12,17.5])
|
22 |
jahat['re_hight']=fuzz.trimf(jahat.universe,[12,17.5,25])
|
|
|
198 |
cs1.compute()
|
199 |
g11=cs1.output['score']
|
200 |
|
201 |
+
# Create axis
|
202 |
+
axes = [int(c1*10),10,int(e1)]
|
203 |
+
|
204 |
+
# Create Data
|
205 |
+
data = np.ones(axes, dtype=np.bool)
|
206 |
+
|
207 |
+
# Control Transparency
|
208 |
+
alpha = 0.9
|
209 |
+
|
210 |
+
# Control colour
|
211 |
+
colors = np.empty(axes + [4], dtype=np.float32)
|
212 |
+
|
213 |
+
colors[:] = [1, 0, 0, alpha] # red
|
214 |
+
|
215 |
+
# Plot figure
|
216 |
+
fig = plt.figure()
|
217 |
+
ax = fig.add_subplot(111, projection='3d')
|
218 |
+
|
219 |
+
# Voxels is used to customizations of the
|
220 |
+
# sizes, positions and colors.
|
221 |
+
ax.voxels(data, facecolors=colors)
|
222 |
+
ax.set_xlim([0,40])
|
223 |
+
ax.set_zlim([0,6])
|
224 |
+
ax.axis('off')
|
225 |
st.header('your score is :')
|
226 |
st.header(g11)
|
227 |
st.set_option('deprecation.showPyplotGlobalUse', False)
|