A modern UI for the RAG-Agent application using Streamlit - providing better UI components and a more user-friendly experience than Chainlit.
- π Document Retrieval: Upload documents and get answers based on their content
- π¬ Chat Interface: Clean, modern chat UI with message bubbles and streaming text
- π€ Model Selection: Proper dropdown menu for Ollama model selection
- π Persistent Sidebar: Always-visible controls for all features
- π± Responsive Design: Works well on desktop and mobile
- π Context Display: Expandable panels to view retrieved context
- ποΈ Toggle Controls: Clear toggles for enabling/disabling features
-
Make sure you have Ollama installed and running:
ollama serve
-
Install the requirements:
pip install -r requirements_streamlit.txt
-
Run the application:
./start_streamlit.sh
Or directly:
streamlit run app_streamlit.py
-
Open your browser to http://localhost:8501
- Use the file upload section in the sidebar to upload one or more documents
- Supported formats: PDF, TXT, CSV, MD, DOC, DOCX
- Type your question in the chat input at the bottom
- The application will:
- Retrieve relevant context from your documents
- Display this context in an expandable panel
- Generate a response based on the retrieved information
- Use the "Database Retrieval" toggle in the sidebar to enable/disable RAG functionality
- When turned off, the model will respond without using document context
- Select a different Ollama model from the dropdown menu
- The change is applied immediately without restarting
- Click the "Clear Chat History" button to start fresh
- This clears both the conversation and document references
- Ollama not connecting: Make sure Ollama is running with
ollama serve - Model not found: Check if the model is installed in Ollama with
ollama list - Documents not loading: Verify file format is supported, try another document
- Better UI Components: Native sidebars, dropdowns, and toggles
- Improved Context Handling: Cleaner display of retrieved document chunks
- More Responsive: UI elements react instantly to changes
- Visual Clarity: Better visual organization of components
- Error Handling: More robust error handling and feedback
- Persistent Settings: UI state persists across page reloads