Run Open Web UI Like a Pro with Python!

Adityakale
2 min readDec 26, 2024

--

Objective: This guide provides detailed steps to install and run the Open Web UI using Python. This UI provides a user-friendly interface for interacting with locally running language models.

Prerequisites

  • Python 3.x installed. You can check this by running:
  • python --version
  • pip (Python package manager) installed. You can verify it with:
  • pip --version

Step 1: Set Up a Virtual Environment

  1. Open VS Code in Powershell terminal and run this commands
  2. Install virtualenv if not already installed:

3. Create the virtual env:

4. Activate the virtual environment:

pip install virtualenv
python -m venv ai
.\ai\Scripts\Activate.ps1

Step 2: Install Open Web UI

With your virtual environment active, you can install Open Web UI using pip:

pip install open-webui

This command will download and install the necessary dependencies for Open Web UI.

Step 3: Launch the Open Web UI

Once the installation is complete, you can start the Open Web UI server. Run the following command in your terminal:

open-webui serve   # default port is 8080 you can modify using this --port 8081 

Step 4: Access the Web Interface

After running the above command, the Open Web UI will be accessible in your web browser. Open any browser and navigate to the following URL:

http://localhost:8080

You should now see the Open Web UI interface, where you can interact with your locally running language models.

Sighup into the open UI and start using your LLM

Step 5: Stop the Open Web UI Server

To stop the Open Web UI server, simply press Ctrl + C in the terminal where the server is running. This will terminate the server and free up the resources.

You’ve successfully installed and launched the Open Web UI using Python! You can now use this interface to interact with your locally running language models, making it easier and more intuitive to explore and experiment with AI models on your machine.

--

--

Adityakale
Adityakale

Written by Adityakale

Software Engineer with expertise in CI/CD, containerization, and infrastructure monitoring.

No responses yet