This repository provides a Streamlit-based chatbot application with multiple UI options (basic and React). It is a practical starting point for building, customizing, and deploying AI-powered chatbot interfaces using Python. Developers can run it locally or inside Docker for quick experimentation and prototyping.
- Explore conversational AI with Streamlit
- Customize chatbot interfaces with ease
- Deploy prototypes quickly in a local or containerized environment
Here’s a simple demo of the chatbot logic in action:
# streamlit_app.py
import streamlit as st
# Simple chatbot response function
def chatbot_response(user_input: str) -> str:
if "hello" in user_input.lower():
return "Hi there! How can I help you today?"
elif "bye" in user_input.lower():
return "Goodbye! Have a great day! 👋"
else:
return "I'm just a demo chatbot. Try saying 'hello' or 'bye'."
# Streamlit UI
st.title("Chatbot Demo 🤖")
# Input box
user_input = st.text_input("You:", "")
# Display chatbot response
if user_input:
response = chatbot_response(user_input)
st.write(f"**Bot:** {response}")- Streamlit-based chatbot UI for fast prototyping
- Multiple application variants: basic, advanced, and React-integrated
- Customizable chatbot logic with simple Python functions
- Optional React tools integration for richer user experience
- Docker support for containerized deployment
- Database utility (database_tools.py) for data storage and interaction
- Clean and modular code structure separating logic and UI
- Python 3.x – main programming language
- Streamlit – for building interactive chatbot UIs
- React (optional) – for advanced and dynamic frontend integration
- SQLite / database_tools.py – lightweight database handling
- Docker – containerized setup and deployment
To set up this project on your local machine:
- Clone the repository
git clone https://github.com/sha-env/streamlit-chatbot-demo.git
- Navigate to the project directory
cd streamlit-chatbot-demo - Install dependencies
pip install -r requirements.txt
- Start the Streamlit app
streamlit run streamlit_react_app.py
- Open the app in your browser
http://localhost:8501
This project is licensed under the Apache-2.0 License. See the LICENSE file for details.