Linting code
This commit is contained in:
parent
6ba3719031
commit
1a6e74271c
@ -4,7 +4,6 @@ Handles running, stopping and resetting the integrated Ollama instance
|
|||||||
"""
|
"""
|
||||||
import subprocess
|
import subprocess
|
||||||
import os
|
import os
|
||||||
import threading
|
|
||||||
from time import sleep
|
from time import sleep
|
||||||
from logging import getLogger
|
from logging import getLogger
|
||||||
from .internal import data_dir, cache_dir
|
from .internal import data_dir, cache_dir
|
||||||
@ -19,7 +18,7 @@ overrides = {}
|
|||||||
def start():
|
def start():
|
||||||
if not os.path.isdir(os.path.join(cache_dir, 'tmp/ollama')):
|
if not os.path.isdir(os.path.join(cache_dir, 'tmp/ollama')):
|
||||||
os.mkdir(os.path.join(cache_dir, 'tmp/ollama'))
|
os.mkdir(os.path.join(cache_dir, 'tmp/ollama'))
|
||||||
global instance, overrides
|
global instance
|
||||||
params = overrides.copy()
|
params = overrides.copy()
|
||||||
params["OLLAMA_HOST"] = f"127.0.0.1:{port}" # You can't change this directly sorry :3
|
params["OLLAMA_HOST"] = f"127.0.0.1:{port}" # You can't change this directly sorry :3
|
||||||
params["HOME"] = data_dir
|
params["HOME"] = data_dir
|
||||||
|
16
src/main.py
16
src/main.py
@ -19,19 +19,19 @@
|
|||||||
"""
|
"""
|
||||||
Main script run at launch, handles actions, about dialog and the app itself (not the window)
|
Main script run at launch, handles actions, about dialog and the app itself (not the window)
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
gi.require_version('Gtk', '4.0')
|
||||||
|
gi.require_version('Adw', '1')
|
||||||
|
from gi.repository import Gtk, Gio, Adw, GLib
|
||||||
|
|
||||||
|
from .window import AlpacaWindow
|
||||||
|
from .internal import cache_dir, data_dir
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
import logging
|
import logging
|
||||||
import gi
|
import gi
|
||||||
import os
|
import os
|
||||||
|
|
||||||
gi.require_version('Gtk', '4.0')
|
|
||||||
gi.require_version('Adw', '1')
|
|
||||||
|
|
||||||
from gi.repository import Gtk, Gio, Adw, GLib
|
|
||||||
from .window import AlpacaWindow
|
|
||||||
from .internal import cache_dir, data_dir
|
|
||||||
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
translators = [
|
translators = [
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#table_widget
|
#table_widget.py
|
||||||
"""
|
"""
|
||||||
Handles the table widget shown in chat responses
|
Handles the table widget shown in chat responses
|
||||||
"""
|
"""
|
||||||
|
@ -19,17 +19,19 @@
|
|||||||
"""
|
"""
|
||||||
Handles the main window
|
Handles the main window
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import gi
|
|
||||||
gi.require_version('GtkSource', '5')
|
|
||||||
gi.require_version('GdkPixbuf', '2.0')
|
|
||||||
from gi.repository import Adw, Gtk, Gdk, GLib, GtkSource, Gio, GdkPixbuf
|
|
||||||
import json, requests, threading, os, re, base64, sys, gettext, locale, subprocess, uuid, shutil, tarfile, tempfile, logging, random
|
import json, requests, threading, os, re, base64, sys, gettext, locale, subprocess, uuid, shutil, tarfile, tempfile, logging, random
|
||||||
from time import sleep
|
from time import sleep
|
||||||
from io import BytesIO
|
from io import BytesIO
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
from pypdf import PdfReader
|
from pypdf import PdfReader
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|
||||||
|
import gi
|
||||||
|
gi.require_version('GtkSource', '5')
|
||||||
|
gi.require_version('GdkPixbuf', '2.0')
|
||||||
|
|
||||||
|
from gi.repository import Adw, Gtk, Gdk, GLib, GtkSource, Gio, GdkPixbuf
|
||||||
|
|
||||||
from . import dialogs, local_instance, connection_handler, available_models_descriptions
|
from . import dialogs, local_instance, connection_handler, available_models_descriptions
|
||||||
from .table_widget import TableWidget
|
from .table_widget import TableWidget
|
||||||
from .internal import config_dir, data_dir, cache_dir, source_dir
|
from .internal import config_dir, data_dir, cache_dir, source_dir
|
||||||
|
Loading…
x
Reference in New Issue
Block a user