dperales commited on
Commit
8c582a1
1 Parent(s): 9395525

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -40,7 +40,7 @@ def main():
40
  # st.markdown("---") # Add a separator line
41
  st.header("Settings")
42
 
43
- num_lines = st.text_input("% of lines to be processed:", value=100)
44
  graph_select = st.checkbox("Show Graphics", value= True)
45
  feat_imp_select = st.checkbox("Feature Importance", value= False)
46
 
@@ -101,7 +101,7 @@ def main():
101
  else:
102
  insurance_claims = pd.read_csv(selected_csv)
103
 
104
- num_rows = int(insurance_claims.shape[0]*int(num_lines)/100)
105
  insurance_claims_reduced = insurance_claims.head(num_rows)
106
  st.write("Rows to be processed: " + str(num_rows))
107
 
@@ -247,7 +247,7 @@ def main():
247
  else:
248
  insurance_claims = pd.read_csv(selected_csv)
249
 
250
- num_rows = int(insurance_claims.shape[0]*int(num_lines)/100)
251
  insurance_claims_reduced = insurance_claims.head(num_rows)
252
  st.write("Rows to be processed: " + str(num_rows))
253
 
 
40
  # st.markdown("---") # Add a separator line
41
  st.header("Settings")
42
 
43
+ num_lines = st.number_input("% of lines to be processed:", min_value=0, max_value=100, value=100)
44
  graph_select = st.checkbox("Show Graphics", value= True)
45
  feat_imp_select = st.checkbox("Feature Importance", value= False)
46
 
 
101
  else:
102
  insurance_claims = pd.read_csv(selected_csv)
103
 
104
+ num_rows = int(insurance_claims.shape[0]*(num_lines)/100)
105
  insurance_claims_reduced = insurance_claims.head(num_rows)
106
  st.write("Rows to be processed: " + str(num_rows))
107
 
 
247
  else:
248
  insurance_claims = pd.read_csv(selected_csv)
249
 
250
+ num_rows = int(insurance_claims.shape[0]*(num_lines)/100)
251
  insurance_claims_reduced = insurance_claims.head(num_rows)
252
  st.write("Rows to be processed: " + str(num_rows))
253