Final Output - Trainline App Review AI - Assistant
In part I, we finished building the backend of the chatbot using OpenAI GPT-4o mini as the Large Language Model (LLM), Chroma as the vector store, OpenAI Embedding as the embedding model and simailry search as the retriever configuration. Today, we continue our journey by integrating the backend to the frontend using Streamlit, free and open-source framework to rapidly build data science web apps.
<aside> 💡 Build a fully function App Review ChatBot Web Application… - Feature 1: Answer users prompt → Two chat message containers to show messages from the user and the bot → A chat input widget for the user type their messages → Bonus: write out repsonse with a typewriter effect - Feature 2: Able to recall previous conversation → A way to store all the chat history and display in the chat message containers
</aside>
We are going to build these design components using Streamlit and then plug the backend to generate the repsonse from our large language model.
Streamlit - A faster way to build and share data apps
Streamlit is a tool that makes it easy to create interactive web applications, especially those that display data or visualizations. Imagine we have some data on our computer, like sales numbers or survey results, and we want to create a simple, user-friendly web page where people can explore this data. Streamlit helps us do that without needing to be experts in web development.
Think of Streamlit as a bridge between our data and a web page. Here’s how it works, step-by-step: