Skip to content

Latest commit

Β 

History

History
102 lines (70 loc) Β· 2.71 KB

File metadata and controls

102 lines (70 loc) Β· 2.71 KB

Ollama CLI:

set OLLAMA_HOST=0.0.0.0

set OLLAMA_PORT=11434

ollama serve

https://ollama.com/

Python-Ollama GUI

A sleek and intuitive desktop application that brings the power of open-source language models to your fingertips.

Python-Ollama GUI provides a user-friendly interface to interact with various AI models through Ollama, featuring real-time response streaming, adjustable parameters, and support for models ranging from the efficient Mistral (7B) to the more powerful OpenAI (20B).

Perfect for developers, writers, and AI enthusiasts who want to harness AI capabilities without dealing with command-line interfaces.

Python-Ollama GUI (Add a screenshot of your application)

Features

  • 🎯 Clean and intuitive graphical user interface
  • πŸ”„ Real-time streaming responses
  • πŸŽ›οΈ Adjustable parameters (temperature, max tokens)
  • πŸ“ Support for system messages and user prompts
  • πŸ›‘ Ability to stop generation mid-stream
  • 🎨 Markdown-style formatting in responses
  • πŸ“Š Multiple model support:
    • Mistral 7B (7B, 4.1GB)
    • DeepSeek R1 (8B, 5.2GB)
    • OpenAI GPT-OSS (20B, 14GB)

Prerequisites

  • Python 3.6+
  • Ollama server running locally or on a remote machine
  • Required Python packages (see requirements.txt)

Installation

  1. Clone this repository:
git clone https://github.com/yourusername/Python-Ollama-Public.git
cd Python-Ollama-Public
  1. Install required dependencies:
pip install -r requirements.txt
  1. Create a .env file based on the provided .env-example:
cp .env-example .env
  1. Edit the .env file with your Ollama server details:
API_IP=127.0.0.1  # Use your Ollama server IP
PORT=11434        # Default Ollama port

Usage

  1. Start the application:
python main.py
  1. Configure your generation settings:

    • Select a model from the dropdown menu
    • Adjust temperature (higher = more creative, lower = more focused)
    • Set maximum tokens for response length
    • Enter a system message to guide the AI's behavior
    • Type your prompt in the user message field
  2. Click "Generate" to start text generation

    • Use the "Stop" button to halt generation at any time
    • Generated text will appear in the response area with markdown formatting

Configuration

The application can be configured through the .env file:

  • API_IP: IP address of your Ollama server
  • PORT: Port number of your Ollama server (default: 11434)

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Acknowledgments

  • Built with Python and Tkinter
  • Powered by Ollama
  • Uses various open-source language models