BookApp / UI_Helper.py
Mr-TD's picture
Upload files
6f27a32
raw
history blame
1.63 kB
import streamlit as st
def dropdown_with_checkbox():
# options = ['Horror', 'Drama', 'Comic', 'Romance'] # Options for the dropdown
options = ["Fantasy",
"Science Fiction",
"Action & Adventure",
"Mystery",
"Horror",
"Thriller & Suspense",
"Historical Fiction",
"Romance",
"Magic",
"Novel",
"Short Story",
"Children’s",
"Memoir & Autobiography",
"Biography",
"Food & Drink",
"Art & Photography",
"History",
"Travel",
"True Crime",
"Humor",
"Religion",
"Science & Technology"]
selected_options = st.multiselect('Select Geners:', options) # Dropdown with checkboxes
return selected_options
def number_input():
number = st.number_input("Enter a number between 1000 and 2023", min_value=1000, max_value=2023, step=1)
return number
def radio_button():
options = ['',
'Education',
'Non Education'] # Options for the radio button
selected_option = st.radio('Enter Year:', options) # Radio button
return selected_option
def radio_button2():
options = ['All',
'Custome Year'] # Options for the radio button
selected_option = st.radio('Select Option:', options) # Radio button
return selected_option
def text_box():
user_input = st.text_input('Enter topic name:') # Text input box
return user_input