Gui
gui ¶
Graphical user interface for the equities classifier.
run_gui() -> None ¶
Run the equities classifier GUI.
Source code in src/equities_classifier/processflow/gui.py
def run_gui() -> None:
"""Run the equities classifier GUI."""
sg.theme("SystemDefault")
layout = [
[
sg.Text(
"Equities Classifier",
font=("Any", 16),
),
],
[
sg.Text("Input file:", size=(14, 1)),
sg.Input(
key="-INPUT-",
expand_x=True,
),
sg.FileBrowse(
"Select ...",
target="-INPUT-",
file_types=(
("Excel files", "*.xlsx"),
("All files", "*.*"),
),
),
],
[
sg.Text("Output file:", size=(14, 1)),
sg.Input(
key="-OUTPUT-",
expand_x=True,
),
sg.FileSaveAs(
"Select ...",
target="-OUTPUT-",
file_types=(
("Excel files", "*.xlsx"),
),
default_extension=".xlsx",
),
],
[
sg.Frame(
"Classification",
[
[
sg.Checkbox(
"GECS",
key="-GECS-",
),
sg.Checkbox(
"GICS",
key="-GICS-",
),
],
],
),
],
[
sg.Frame(
"Additional output",
[
[
sg.Checkbox(
"Detailed provider information",
key="-PROVIDER-",
),
],
],
),
],
[
sg.Push(),
sg.Button(
"Start",
key="-START-",
bind_return_key=True,
),
sg.Button(
"Cancel",
key="-CANCEL-",
),
],
[
sg.Text(
"",
key="-STATUS-",
expand_x=True,
),
],
]
window = sg.Window("Equities Classifier", layout, resizable=True, finalize=True)
try:
_event_loop(window)
finally:
window.close()