Spaces:
Sleeping
Sleeping
| import streamlit as st | |
| from constants import builders | |
| from helper import find_best_match | |
| from st_keyup import st_keyup | |
| st.set_page_config(layout="wide") | |
| st.title("FuzzyWuzzy") | |
| st.markdown(" ### Search for a builder from the database") | |
| value = st_keyup(label="Enter a builder name:", key="0", placeholder="Enter a name...", label_visibility="collapsed") | |
| if not value == "": | |
| st.markdown(" ### You're probably looking for:") | |
| st.markdown(find_best_match(value)) | |
| with st.expander(label="**View Database**", expanded=True): | |
| c1, c2, c3, c4, c5 = st.columns(5) | |
| with c1: | |
| st.markdown("\n".join(builders[:10])) | |
| with c2: | |
| st.markdown("\n".join(builders[11:21])) | |
| with c3: | |
| st.markdown("\n".join(builders[22:32])) | |
| with c4: | |
| st.markdown("\n".join(builders[33:43])) | |
| with c5: | |
| st.markdown("\n".join(builders[44:])) | |