Skip to content

Commit

Permalink
Commit local changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Richjerk committed May 20, 2024
1 parent 2cc0c32 commit d3eca7f
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions streamlit_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,37 @@ def query_ollama3(input_text):
# Streamlit App
st.title("Township Small Business Chatbot")

<<<<<<< HEAD
=======
# Authentication and Registration (Placeholder)
def authenticate():
username = st.text_input("Username")
password = st.text_input("Password", type="password")
if st.button("Login"):
if username == "admin" and password == "password":
st.session_state["authenticated"] = True
else:
st.error("Invalid credentials")

def register():
new_username = st.text_input("New Username")
new_password = st.text_input("New Password", type="password")
if st.button("Register"):
st.success("Registration successful! Please log in.")

if "authenticated" not in st.session_state:
st.session_state["authenticated"] = False

if not st.session_state["authenticated"]:
st.sidebar.header("Login / Register")
auth_option = st.sidebar.radio("Choose an option", ["Login", "Register"])
if auth_option == "Login":
authenticate()
else:
register()
st.stop()

>>>>>>> 857ed2c (Commit local changes)
# Business Profile Input
st.header("Business Profile")
business_name = st.text_input("Business Name")
Expand Down

0 comments on commit d3eca7f

Please sign in to comment.