Skip to content

A simple web interface with Markdown support built using Flask, designed to interact with Ollama models.

License

Notifications You must be signed in to change notification settings

Fr3ddy404/flask-webui

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flask WebUI

A simple web interface with Markdown support built using Flask, designed to interact with Ollama models.

Table of Contents

  1. Installation
  2. Features
  3. Usage
  4. License

Features

  • πŸ’¬ LLM Chat: Chat with your Ollama instance.
  • πŸ“– Markdown Support: Chat messages are rendered in markdown.
  • πŸ“š Multiple Conversations: Have multiple conversation.
  • πŸ“œ Chat History: Chat history is saved locally.
  • ✍️ Custom Prompts: Create and save custom prompts for you models.
  • ⏩ Message Stream: Messages are streamed by the llm.

Installation

Using pip

Use the package manager pip to install the dependencies.

pip install -r requirements.txt

Using Nix

  1. Follow the Nix installation instructions to set up nix.

  2. Enter the development shell from the flake.nix.

nix develop

Usage

To run the application, navigate to the root directory and execute:

Warning

This command uses the Flask server in debug mode.

FLASK_APP=app/views FLASK_ENV=development flask --debug run

Example

demo of the Flask WebUI

Select Models

By default a demo LLM is used. If you want to use your own models with Ollama you have to edit the app/app.py file.

# set the model name to your model or leave it empty for the demo
MODEL_NAME = "" # "llama3.2:3b-instruct-q5_K_M"

Markdown

You can use markdown commands in your messages.

short markdown exaple

Answers by the model in markdown are rendered.

Spoilers

Example of a spoiler

Parts of the messages enclosed in [ and ] are hidden and can be made visble while hovering over it or by clicking on it.

License

This project is licensed under the MIT License. Feel free to modify and use it as you wish!

About

A simple web interface with Markdown support built using Flask, designed to interact with Ollama models.

Topics

Resources

License

Stars

Watchers

Forks