From 0a89146cf3092a8b8f6b9202772a768fd67cf99c Mon Sep 17 00:00:00 2001 From: chyok Date: Fri, 19 Jul 2024 18:55:37 +0800 Subject: [PATCH] Init page --- .gitignore | 165 ++++++++++++++++++++++++++++++++++++++++++ 404.html | 25 +++++++ Gemfile | 5 ++ README.md | 2 - _config.yml | 16 ++++ _layouts/default.html | 50 +++++++++++++ index.md | 108 +++++++++++++++++++++++++++ 7 files changed, 369 insertions(+), 2 deletions(-) create mode 100644 .gitignore create mode 100644 404.html create mode 100644 Gemfile delete mode 100644 README.md create mode 100644 _config.yml create mode 100644 _layouts/default.html create mode 100644 index.md diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d99cbae --- /dev/null +++ b/.gitignore @@ -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 diff --git a/404.html b/404.html new file mode 100644 index 0000000..086a5c9 --- /dev/null +++ b/404.html @@ -0,0 +1,25 @@ +--- +permalink: /404.html +layout: default +--- + + + +
+

404

+ +

Page not found :(

+

The requested page could not be found.

+
diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..41fb016 --- /dev/null +++ b/Gemfile @@ -0,0 +1,5 @@ +source "https://rubygems.org" + + +gem "github-pages", group: :jekyll_plugins +gem "webrick" \ No newline at end of file diff --git a/README.md b/README.md deleted file mode 100644 index 0098c3b..0000000 --- a/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# ollama-gui -A very simple ollama GUI, implemented using the built-in Python Tkinter library, with no additional dependencies. diff --git a/_config.yml b/_config.yml new file mode 100644 index 0000000..b4cdc50 --- /dev/null +++ b/_config.yml @@ -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 diff --git a/_layouts/default.html b/_layouts/default.html new file mode 100644 index 0000000..1c482c3 --- /dev/null +++ b/_layouts/default.html @@ -0,0 +1,50 @@ + + + + + + +{% seo %} + + + + + + + {% include head-custom.html %} + + + + +
+ +
+
+

{{ site.title | default: site.github.repository_name }}

+

{{ site.description | default: site.github.project_tagline }}

+ +
+ + {{ content }} + +
+ +
+ + \ No newline at end of file diff --git a/index.md b/index.md new file mode 100644 index 0000000..cd3b702 --- /dev/null +++ b/index.md @@ -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 \ No newline at end of file