Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Beta b #202

Merged
merged 2 commits into from
Mar 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 14 additions & 15 deletions Interface/GUI/Data/GUI_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,15 @@
# prep GUI
sg.theme("GrayGrayGray")
# Start
sg.popup_auto_close("Loading GUI...", non_blocking=True, auto_close_duration=2, no_titlebar=False)
sg.popup_auto_close(
"┌──────────┐\n Loading... \n└──────────┘",
non_blocking=True,
auto_close_duration=3,
no_titlebar=True,
line_width=32,
button_type=sg.POPUP_BUTTONS_NO_BUTTONS,
font=(None, 14, "bold"),
)
# pylib
try:
# import re # noqa: F401
Expand Down Expand Up @@ -63,7 +71,6 @@
from Utils.print_color_V2_NEW import print_Color_V2 # noqa: F401
from Utils.print_color_V1_OLD import print_Color
from Utils.FixedDropout import FixedDropout
from Utils.Other import * # noqa: F403
except (ImportError, NameError):
print("Failed to load the GUI libs")
print("detailed error message:")
Expand All @@ -79,7 +86,7 @@
sys.exit()
# global vars>>>
# CONST SYS
GUI_Ver = "0.9.4"
GUI_Ver = "0.9.5"
Model_dir = "Data/PAI_model" # without file extention
Database_dir = "Data/dataset.npy"
IMG_AF = ("JPEG", "PNG", "BMP", "TIFF", "JPG", "DCM", "DICOM")
Expand Down Expand Up @@ -141,7 +148,7 @@ def is_updated(self):
sg.Button("Browse", key="-BUTTON_BROWSE_IMG_dir-"),
],
[sg.Text("Log:", font=(None, 10, "bold"))],
[sg.Multiline(key="-OUTPUT_ST-", size=(54, 6), autoscroll=True)],
[sg.Multiline(key="-OUTPUT_ST-", size=(54, 6), autoscroll=True, disabled=True)],
[sg.Text("Result:", font=(None, 10, "bold"))],
[sg.Text(key="-OUTPUT_ST_R-", size=(50, 2), background_color="white")],
[
Expand Down Expand Up @@ -177,13 +184,7 @@ def is_updated(self):
GUI_layout_Tab_Sys_Info = [
[sg.Text("System Info:", font=(None, 10, "bold"))],
[
sg.Multiline(
"N/A",
key="-OUTPUT_ST_SYS_INFO-",
size=(54, 8),
autoscroll=True,
expand_y=True,
)
sg.Multiline("N/A", key="-OUTPUT_ST_SYS_INFO-", size=(54, 8), expand_y=True, disabled=True),
],
]

Expand Down Expand Up @@ -718,12 +719,10 @@ def UWL(Only_finalize: bool = False) -> None:
def main() -> None:
"""Main function for the GUI."""
# start
sg.SystemTray.notify("Pneumonia-Detection-Ai-GUI", f"Gui started.\nV{GUI_Ver}")
# sg.SystemTray.notify("Pneumonia-Detection-Ai-GUI", f"Gui started.\nV{GUI_Ver}")
if Debug_m:
sg.SystemTray.notify(
"Pneumonia-Detection-Ai-GUI",
f"Looks like you are a programmer\nWow.\nV{GUI_Ver}",
icon=sg.SYSTEM_TRAY_MESSAGE_ICON_WARNING,
"Pneumonia-Detection-Ai-GUI", f"Looks like you are a programmer\nWow.\nV{GUI_Ver}", icon=sg.SYSTEM_TRAY_MESSAGE_ICON_WARNING
)
sg.show_debugger_window()
# global
Expand Down
121 changes: 0 additions & 121 deletions Interface/GUI/Data/Utils/Other.py

This file was deleted.

25 changes: 0 additions & 25 deletions Interface/GUI/Data/Utils/README.md

This file was deleted.

Loading
Loading