fix: Import tkinter locally in directory browse buttons

This commit is contained in:
Bobby Abellana (aider) 2025-02-11 11:16:59 -08:00
parent 367353d451
commit 3e40b604bc

View File

@ -180,6 +180,8 @@ with col1:
with col1_browse1:
if st.button("Browse", key='source_browse'):
try:
import tkinter as tk
from tkinter import filedialog
root = tk.Tk()
root.withdraw()
path = filedialog.askdirectory(title="Select Source Directory")
@ -200,6 +202,8 @@ with col1:
with col2_browse1:
if st.button("Browse", key='dest_browse'):
try:
import tkinter as tk
from tkinter import filedialog
root = tk.Tk()
root.withdraw()
path = filedialog.askdirectory(title="Select Destination Directory")
@ -237,6 +241,8 @@ with col2:
with col3_browse1:
if st.button("Browse", key='password_browse'):
try:
import tkinter as tk
from tkinter import filedialog
root = tk.Tk()
root.withdraw()
path = filedialog.askopenfilename(