Kolpitor commited on
Commit
55f7cb4
·
1 Parent(s): 6a8997f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -29
app.py CHANGED
@@ -17,39 +17,20 @@ import streamlit as st
17
  # IOT
18
  """
19
 
 
20
 
21
- max_depth_input = st.slider("Max depth", 1, 100, 5)
22
- colsample_bytree_input = st.slider("Colsample bytree", 0.0, 1.0, 0.5)
23
- learning_rate_input = st.slider("Learning rate", 0.0, 1.0, 0.2)
24
- alpha_input = st.slider("Alpha", 1, 100, 10)
25
- n_estimators_input = st.slider("n estimators", 1, 100, 20)
26
-
27
-
28
 
29
  df = pd.read_csv("city_temperature.csv")
30
 
31
- city_input = st.selectbox(
32
- 'Which region do you want to predict temparature ?',
33
- ("all",
34
- df["Region"].unique()), index=0)
35
-
36
- city_input = st.selectbox(
37
- 'Which region do you want to predict temparature ?',
38
- ("all",
39
- df["Region"].drop_duplicates()), index=0)
40
-
41
- test = df["Region"].unique()
42
- test2 = df["Region"].drop_duplicates()
43
-
44
- city_input = st.selectbox(
45
- 'Which region do you want to predict temparature ?',
46
- ("all",
47
- test), index=0)
48
-
49
- city_input = st.selectbox(
50
- 'Which region do you want to predict temparature ?',
51
- ("all",
52
- test2), index=0)
53
 
54
  def mergeStateToCountry():
55
  df.loc[df['State'].notna(), 'Country'] = df['State']
 
17
  # IOT
18
  """
19
 
20
+ merge = st.checkbox("Merge US country with State ?")
21
 
22
+ all_region = st.checkbox("Take all Region ?", value=True)
23
+ all_country = st.checkbox("Take all Country ?", value=True)
24
+ all_state = st.checkbox("Take all State ?", value=True)
25
+ all_city = st.checkbox("Take all City ?", value=True)
 
 
 
26
 
27
  df = pd.read_csv("city_temperature.csv")
28
 
29
+ if all_region == False:
30
+ region = st.selectbox(
31
+ 'Which region do you want to predict temparature ?',
32
+ (df["Region"].unique()), index=0)
33
+ df.drop(df.loc[df['Location'] != region].index, inplace=True)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
 
35
  def mergeStateToCountry():
36
  df.loc[df['State'].notna(), 'Country'] = df['State']