blazingbunny
commited on
Commit
•
9500b17
1
Parent(s):
2b3eca9
Update app.py
Browse files
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
|
20 |
-
|
21 |
-
|
|
|
|
|
|
|
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'):
|