OrionVision/LoraViewer/main.py

39 lines
836 B
Python

# img_viewer.py
import PySimpleGUI as sg
import os.path
# First the window layout in 2 columns
sg.theme('DarkAmber') # Add a touch of color
panel_view_column = [
[
sg.Text("字符识别结果:", font=("微软雅黑", 20), size=(23, 1))
],
[
sg.Text("未识别", key="-CHARACTER-", font=("微软雅黑", 25), size=(5, 1))
]
]
# ----- Full layout -----
layout = [[sg.VPush()],
[
sg.Push(),
sg.Column(panel_view_column, vertical_alignment="center", justification="center"),
sg.Push(),
],
[sg.VPush()],
]
window = sg.Window("Lora 回传显示模块", layout, resizable=True, size=(500, 300), finalize=True)
# Run the Event Loop
while True:
event, values = window.read()
if event == "Exit" or event == sg.WIN_CLOSED:
break
window.close()