i, currently have a model trained, with an GUI using customtkinter. Everything working fine in Pycharm. But when i try deploy to exe with auto-py-to-exe, this issue happens. Every time my software uses the function from yolo, my GUI be duplicated. it just calls another GUI and nothing happens after that.
Sorry for my bad english
from ultralytics import YOLO
import time
import os
import customtkinter
current_path = os.path.dirname(os.path.abspath(__file__))
data_path = os.path.join(current_path, "data")
model = YOLO(os.path.join(current_path, "data","best.pt"))
def load_model():
print("Loading model...")
results = model.predict(os.path.join(current_path,"docs","rune_screenshots","dragon.png"),show=True)
print("Done")
if __name__ == "__main__":
customtkinter.set_appearance_mode("light") # Modes: system (default), light, dark
customtkinter.set_default_color_theme("green") # Themes: blue (default), dark-blue, green
window = customtkinter.CTk()
window.title("Test")
window.geometry('50x50')
start_button = customtkinter.CTkButton(window, width=80, height=26, text="Start", command=load_model)
start_button.grid(row=0, column=1, padx=1, pady=1)
window.mainloop()
Can anyone help me solve this issue