blazingbunny commited on
Commit
9500b17
1 Parent(s): 2b3eca9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -16,9 +16,12 @@ if uploaded_file is not None:
16
  user_input = uploaded_file.read().decode('utf-8')
17
  total_length = len(user_input.split())
18
 
19
- # Add sliders to the sidebar
20
- min_length_percentage = st.sidebar.slider('Minimum Length %', min_value=10, max_value=100, value=50)
21
- max_length_percentage = min_length_percentage + 10
 
 
 
22
  st.sidebar.text(f'Maximum Length %: {max_length_percentage}')
23
 
24
  if st.button('Summarize'):
 
16
  user_input = uploaded_file.read().decode('utf-8')
17
  total_length = len(user_input.split())
18
 
19
+ # Add slider to the sidebar for the scale value
20
+ scale_percentage = st.sidebar.slider('Scale %', min_value=1, max_value=100, value=50)
21
+ min_length_percentage = max(scale_percentage - 10, 1) # Ensure min_length_percentage is not less than 1
22
+ max_length_percentage = min(scale_percentage + 10, 100) # Ensure max_length_percentage is not more than 100
23
+
24
+ st.sidebar.text(f'Minimum Length %: {min_length_percentage}')
25
  st.sidebar.text(f'Maximum Length %: {max_length_percentage}')
26
 
27
  if st.button('Summarize'):