Grumble is a Streamlit-based chatbot application that leverages models available in Ollama to provide responses to user inputs. This application allows users to upload PDF files, extract text from them, and use the extracted text to generate responses from selected language models.
- List and select available models from Ollama.
- Upload PDF files and extract text using
pdfplumber
. - Generate responses using selected models from Ollama.
- Display chat messages with a user-friendly interface.
- Clear chat history with a single click.
- Clone the repository:
git clone https://github.com/fzappa/grumble.git
cd grumble
- Create the Hatch environment:
If you are already using a python environment (Anaconda, mamba, miniconda...)
pip install hatch
hatch env create
-
Ensure the Ollama service is running and accessible at
http://localhost:11434
. -
Start the Streamlit application:
hatch run streamlit run grumble.py
- Open your web browser and navigate to
http://localhost:8501
to use the chatbot.
-
Select a Model:
- Choose an available model from the dropdown list in the sidebar.
-
Upload a PDF:
- Use the file uploader in the main interface to upload a PDF file.
- Once uploaded, the text from the PDF will be extracted.
-
Chat:
- The extracted text will be used to generate responses from the selected model.
- Chat messages will be displayed in the main interface.
-
Clear Chat History:
- Click the "Clear Chat History" button in the sidebar to reset the chat.
src/grumble/ollama_utils.py
OLLAMA_API_URL
: The base URL for the Ollama API.DEFAULT_PROMPT
: The default prompt used to initialize the chat.