Compare commits

..

6 Commits

4 changed files with 52 additions and 27 deletions

View File

@ -4,19 +4,18 @@ on:
jobs: jobs:
package: package:
runs-on: ${{ matrix.os }} runs-on: self-hosted
strategy: strategy:
matrix: matrix:
os: [windows-latest, ubuntu-latest] os: [windows-latest, ubuntu-latest]
steps: steps:
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v2 uses: actions/setup-python@v3
with: with:
python-version: 3.x python-version: 3.x
node-version: 16
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v2 uses: actions/checkout@v3
- name: Install dependencies - name: Install dependencies
run: | run: |
@ -30,7 +29,7 @@ jobs:
cp webuiGUI.py dist/ # Copy webuiGUI.py to the dist directory cp webuiGUI.py dist/ # Copy webuiGUI.py to the dist directory
- name: Upload artifacts - name: Upload artifacts
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v3
with: with:
name: ${{ matrix.os }}-binary-v1.3 name: ${{ matrix.os }}-binary-v1.3.1
path: dist path: dist

View File

@ -7,7 +7,7 @@ As someone who isn't a professional programmer, I enjoy experimenting and findin
WebUI StartGUI is a Python graphical user interface (GUI) written with PyQT5, that allows users to configure settings and start the oobabooga web user interface (WebUI). It provides a convenient way to adjust various parameters and launch the WebUI with the desired settings. WebUI StartGUI is a Python graphical user interface (GUI) written with PyQT5, that allows users to configure settings and start the oobabooga web user interface (WebUI). It provides a convenient way to adjust various parameters and launch the WebUI with the desired settings.
## Current Features ## Current Features
- Select a model from a dropdown menu (with reload button if added while the StartUI is open) - Select a model from a dropdown menu or none (with reload button if added while the StartUI is open)
- Choose wbits and groupsize options - Choose wbits and groupsize options
- Select the operating mode (chat, cai-chat, notebook) - Select the operating mode (chat, cai-chat, notebook)
- Choose between CPU, GPU or Autodevice - Choose between CPU, GPU or Autodevice
@ -21,10 +21,11 @@ WebUI StartGUI is a Python graphical user interface (GUI) written with PyQT5, th
- Save settings to a profile - Save settings to a profile
- Load profiles via Dropdown menu. - Load profiles via Dropdown menu.
- Run the text-generation-webui Updater - Run the text-generation-webui Updater
- StartUI Update Notification
## How to Use ## How to Use
1. Clone the repository or download the source code. 1. Clone the repository or download the source code.
2. Install the required dependencies listed in the `requirements.txt` file. (PyQT5 & gpustat) 2. Install the required dependencies listed in the `requirements.txt` file.
3. Run the `StartUI.py` script using Python `python3 StartUI.py`. 3. Run the `StartUI.py` script using Python `python3 StartUI.py`.
4. Configure the desired settings using the GUI elements. 4. Configure the desired settings using the GUI elements.
5. Click the "Save Settings" button to save the current settings to a profile. 5. Click the "Save Settings" button to save the current settings to a profile.
@ -40,10 +41,15 @@ On Linux, you'll need to give StartUI the executable flag (`chmod +x StartUI` or
The WebuiGUI.py must also be there, to handle the flags properly The WebuiGUI.py must also be there, to handle the flags properly
## Screenshots ## Screenshots
V1.1 :\ V1.3 :\
![Screenshot 2023-05-13 232040](https://github.com/Pakobbix/StartUI-oobabooga-webui/assets/6762686/565feaea-ef67-4081-9978-2aa314763da7) <details>
![Screenshot 2023-05-13 232054](https://github.com/Pakobbix/StartUI-oobabooga-webui/assets/6762686/1c2a9acf-b193-4dd2-abd5-08dcd719c550)
![Screenshot 2023-05-13 232103](https://github.com/Pakobbix/StartUI-oobabooga-webui/assets/6762686/cfd11947-b11b-4ef4-be74-d5e15ab75b22) <summary>Screenshots</summary>
![image](https://github.com/Pakobbix/StartUI-oobabooga-webui/assets/6762686/0796055f-dae8-4c05-8839-ac7a006446cc)
![image](https://github.com/Pakobbix/StartUI-oobabooga-webui/assets/6762686/142f2570-4b53-4198-b40b-effa0fcc5bc3)
</details>

View File

@ -1,8 +1,8 @@
import sys, gpustat, os, json, subprocess, platform, psutil, urllib.request, re, requests, darkdetect, qdarktheme import sys, gpustat, os, json, subprocess, platform, psutil, re, requests, darkdetect, qdarkstyle
from PyQt5.QtWidgets import QApplication, QToolBar, QMessageBox, QAction, QProgressBar, QMainWindow, QLabel, QVBoxLayout, QComboBox, QSlider, QCheckBox, QLineEdit, QFileDialog, QPushButton, QWidget, QListWidget, QListWidgetItem, QToolTip, QGridLayout, QRadioButton, QFrame, QDialog from PyQt5.QtWidgets import QApplication, QToolBar, QMessageBox, QAction, QMainWindow, QLabel, QVBoxLayout, QComboBox, QSlider, QCheckBox, QLineEdit, QFileDialog, QPushButton, QWidget, QListWidget, QListWidgetItem, QGridLayout, QRadioButton, QFrame
from PyQt5.QtCore import Qt from PyQt5.QtCore import Qt
version = "1.3" version = "1.3.1"
profiles_folder = "./profiles" profiles_folder = "./profiles"
os.makedirs(profiles_folder, exist_ok=True) os.makedirs(profiles_folder, exist_ok=True)
@ -84,12 +84,6 @@ class MainWindow(QMainWindow):
help_menu = menu.addMenu("Help") help_menu = menu.addMenu("Help")
# Help menu actions # Help menu actions
# About Action
about_action = QAction("About", self)
about_action.setToolTip("Opens the About Page")
about_action.triggered.connect(self.show_about_window)
help_menu.addAction(about_action)
# Github action # Github action
github_action = QAction("Github", self) github_action = QAction("Github", self)
github_action.setStatusTip("Opens the Github Page") github_action.setStatusTip("Opens the Github Page")
@ -108,6 +102,21 @@ class MainWindow(QMainWindow):
help_menu.addAction(version_action) help_menu.addAction(version_action)
version_action.triggered.connect(self.show_version_window) version_action.triggered.connect(self.show_version_window)
# About Action
about_action = QAction("About", self)
about_action.setToolTip("Opens the About Page")
about_action.triggered.connect(self.show_about_window)
help_menu.addAction(about_action)
# seperator
help_menu.addSeparator()
# Report Bug
report_bug_action = QAction("Report Bug", self)
report_bug_action.setToolTip("Opens the Github Issue Page with creating a new issue")
report_bug_action.triggered.connect(self.on_report_bug_clicked)
help_menu.addAction(report_bug_action)
layout = QGridLayout() layout = QGridLayout()
layout.setColumnMinimumWidth(3, 30) layout.setColumnMinimumWidth(3, 30)
@ -484,6 +493,16 @@ class MainWindow(QMainWindow):
except OSError: except OSError:
self.show_error_message("Error", f"Could not open the link. Please open it manually.\n{release_url}") self.show_error_message("Error", f"Could not open the link. Please open it manually.\n{release_url}")
def on_report_bug_clicked(self):
github_new_issue = "https://github.com/Pakobbix/StartUI-oobabooga-webui/issues/new"
if sys.platform == "win32":
os.startfile(github_new_issue)
else:
try:
subprocess.Popen(["xdg-open", github_new_issue])
except OSError:
self.show_error_message("Error", f"Could not open the link. Please open it manually.\n{github_new_issue}")
def on_Github_clicked(self): def on_Github_clicked(self):
startui_url = "https://github.com/Pakobbix/StartUI-oobabooga-webui/" startui_url = "https://github.com/Pakobbix/StartUI-oobabooga-webui/"
if sys.platform == "win32": if sys.platform == "win32":
@ -860,11 +879,11 @@ class MainWindow(QMainWindow):
command += f" --extensions {' '.join(extensions)}" command += f" --extensions {' '.join(extensions)}"
# Just for debugging. # Just for debugging.
#print(f"Command generated: python webuiGUI.py {command}") print(f"Command generated: python webuiGUI.py {command}")
# Based on the Model that's chosen, we will take care of some necessary stuff. # Based on the Model that's chosen, we will take care of some necessary stuff.
# Starts the webui in the conda env with the user given Options # Starts the webui in the conda env with the user given Options
run_cmd_with_conda(f"python webuiGUI.py {command}") #run_cmd_with_conda(f"python webuiGUI.py {command}")
if self.use_autoclose_checkbox.isChecked(): if self.use_autoclose_checkbox.isChecked():
sys.exit() sys.exit()
@ -973,7 +992,8 @@ class MainWindow(QMainWindow):
if __name__ == "__main__": if __name__ == "__main__":
app = QApplication(sys.argv) app = QApplication(sys.argv)
main_window = MainWindow() main_window = MainWindow()
if darkdetect.isDark():
app.setStyleSheet(qdarktheme.load_stylesheet())
main_window.show() main_window.show()
if darkdetect.isDark():
dark_stylesheet = qdarkstyle.load_stylesheet_pyqt5()
app.setStyleSheet(dark_stylesheet)
sys.exit(app.exec_()) sys.exit(app.exec_())

View File

@ -1,6 +1,6 @@
PyQt5 PyQt5
gpustat gpustat
psutil psutil
pyqtdarktheme qdarkstyle
darkdetect darkdetect
requests requests