Skip to content

Commit

Permalink
Init page
Browse files Browse the repository at this point in the history
  • Loading branch information
chyok committed Jul 19, 2024
1 parent 9afa9c9 commit 0a89146
Show file tree
Hide file tree
Showing 7 changed files with 369 additions and 2 deletions.
165 changes: 165 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/#use-with-ide
.pdm.toml

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
.idea/
_site
.sass-cache
.jekyll-cache
.jekyll-metadata
vendor
25 changes: 25 additions & 0 deletions 404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
permalink: /404.html
layout: default
---

<style type="text/css" media="screen">
.container {
margin: 10px auto;
max-width: 600px;
text-align: center;
}
h1 {
margin: 30px 0;
font-size: 4em;
line-height: 1;
letter-spacing: -1px;
}
</style>

<div class="container">
<h1>404</h1>

<p><strong>Page not found :(</strong></p>
<p>The requested page could not be found.</p>
</div>
5 changes: 5 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
source "https://rubygems.org"


gem "github-pages", group: :jekyll_plugins
gem "webrick"
2 changes: 0 additions & 2 deletions README.md

This file was deleted.

16 changes: 16 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
title: Ollama GUI
email: chyok@hotmail.com
description:
A very simple ollama GUI, implemented using the built-in Python Tkinter library,
with no additional dependencies.
Provide you with the simplest possible visual Ollama interface.
remote_theme: pages-themes/midnight@v0.2.0
repository: chyok/ollama-gui
plugins:
- jekyll-feed
- jekyll-remote-theme

github:
release_url: https://github.com/chyok/ollama-gui/releases

show_downloads: true
50 changes: 50 additions & 0 deletions _layouts/default.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<!doctype html>
<html lang="{{ site.lang | default: "en-US" }}">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">

{% seo %}
<link rel="stylesheet" href="{{ '/assets/css/style.css?v=' | append: site.github.build_revision | relative_url }}">
<script src="https://code.jquery.com/jquery-1.12.4.min.js" integrity="sha256-ZosEbRLbNQzLpnKIkEdrPv7lOy9C27hHQ+Xp8a4MxAQ=" crossorigin="anonymous"></script>
<script src="{{ '/assets/js/respond.js' | relative_url }}"></script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<!--[if lt IE 8]>
<link rel="stylesheet" href="{{ '/assets/css/ie.css' | relative_url }}">
<![endif]-->
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
{% include head-custom.html %}
</head>
<body>
<div id="header">
<nav>
<ul>
<li class="fork"><a href="{{ site.github.repository_url }}">View On GitHub</a></li>
{% if site.show_downloads %}
<li class="downloads"><a href="{{ site.github.release_url }}">Windows</a></li>
<li class="downloads"><a href="{{ site.github.release_url }}">Mac</a></li>
<li class="downloads"><a href="{{ site.github.release_url }}">Linux</a></li>
<li class="title">DOWNLOADS</li>
{% endif %}
</ul>
</nav>
</div><!-- end header -->

<div class="wrapper">

<section>
<div id="title">
<h1>{{ site.title | default: site.github.repository_name }}</h1>
<p>{{ site.description | default: site.github.project_tagline }}</p>

</div>

{{ content }}

</section>

</div>
</body>
</html>
108 changes: 108 additions & 0 deletions index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
---
layout: default
---

![ollama-gui-1 2 0](https://github.com/user-attachments/assets/a4bb979b-68a4-4062-b484-7542f2a866e0)

## 🚀 Features
### v1.1.0
+ 📁 One file project.
+ 📦 No external dependencies, only **tkinter** which is usually bundled.
+ 🔍 Auto check ollama model list.
+ 🌐 Customizable ollama host support.
+ 💬 Multiple conversations.
+ 📋 Menu bar and right-click menu.
+ 🛑 Stop generating at any time.

### v1.2.0

+ 🗂️ Model Management: Download and Delete Models.
+ 🎨 UI Enhancement: Bubble dialog theme.
+ 📝 Editable Conversation History.



## 📎 Before Start

We need to set up llama service first.

Please refer to:
+ [Ollama](https://ollama.com/)
+ [Ollama Github](https://github.com/ollama/ollama)

## ⚙️ Run

Choose any way you like:
> **Note: If you are using a Mac and the system version is Sonoma, please refer to the Q&A at the bottom.**
### binary file

| Platform | Download Link |
| ------------------- | -------------------------------------------------------- |
| Windows | [Download](https://github.com/chyok/ollama-gui/releases) |
| Mac (Apple Silicon) | [Download](https://github.com/chyok/ollama-gui/releases) |
| Linux | [Download](https://github.com/chyok/ollama-gui/releases) |

### source code

```
python ollama_gui.py
```

### using pip

```
pip install ollama-gui
ollama-gui
```

## 📋 Q&A
### I'm using a Mac, why does the application sometimes not respond when I click on it?

The issue affects macOS Sonoma users running applications that use Tcl/Tk versions 8.6.12 or older, including various Python versions.
When the mouse cursor is inside the Tkinter window during startup, GUI elements become unresponsive to clicks.

Solution:
Update to Tcl/Tk version 8.6.13 or newer, which fixes this problem.

For Python users, this can be done by:
Using Python 3.11.7 or later, which bundles the fixed Tcl/Tk version.
Using Python 3.12 or later, which already includes the fix.
https://www.python.org/downloads/macos/

For other Python versions, installing Tcl/Tk 8.6.13+ separately (e.g., via Homebrew) and ensuring Python uses this version.

Here is the issue: https://github.com/python/cpython/issues/110218

------




### ImportError: No module named 'Tkinter'

This probably happens because the Tk library is not installed.

For Ubuntu or other distros with Apt:

```
sudo apt-get install python3-tk
```

For Fedora:

```
sudo dnf install python3-tkinter
```

For macOS:

```
brew install python-tk
```

For Windows:

make sure to **check in the Python install the optional feature "tcl/tk and IDLE"**.

Refer to: https://stackoverflow.com/questions/25905540/importerror-no-module-named-tkinter

0 comments on commit 0a89146

Please sign in to comment.