import os import shutil from IPython.utils import capture import ipywidgets as widgets from IPython.display import display # Create text input widgets for the parameters v_parameterization = widgets.Checkbox(description='v_parameterization', value=False) Tên_Lora = widgets.Text(value="japandi interior", description='Tên Lora:') Thư_mục_chứa_hình_ảnh_đầu_vào = Tên_Lora Phong_cách_muốn_tạo = widgets.Dropdown(options=["2D, Hội hoạ", "Anime 3D", "Anime", "Thực tê", "MidJourneyV4 Style", "Cơ Bản"], description='Phong cách muốn tạo:') Model_dùng_để_train_tuỳ_chọn = widgets.Text(value="", description='Model dùng để train tuỳ chọn:') Tăng_cường_Nội_dung_muốn_tạo = widgets.Dropdown(options=["", "người", "thiếu_nữ", "nội_thất", "ngoại_thất_nhà_phố"], description='Tăng cường Nội dung muốn tạo:') Loại_nội_dung = Tăng_cường_Nội_dung_muốn_tạo # Create a button widget run_button = widgets.Button(description='Run') # Define a function to handle the button click event def run_button_clicked(button): v2 = False v_parameterization_value = v_parameterization.value Tên_Lora_value = Tên_Lora.value Thư_mục_chứa_hình_ảnh_đầu_vào_value = Thư_mục_chứa_hình_ảnh_đầu_vào.value Thư_mục_chứa_Lora_sau_khi_train_value = Thư_mục_chứa_Lora_sau_khi_train.value Phong_cách_muốn_tạo_value = Phong_cách_muốn_tạo.value Model_dùng_để_train_tuỳ_chọn_value = Model_dùng_để_train_tuỳ_chọn.value Tăng_cường_Nội_dung_muốn_tạo_value = Tăng_cường_Nội_dung_muốn_tạo.value Loại_nội_dung_value = Loại_nội_dung.value # Rest of the code... # Register the function to handle the button click event run_button.on_click(run_button_clicked) # Display the widgets widgets.VBox([ v_parameterization, Tên_Lora, Thư_mục_chứa_hình_ảnh_đầu_vào, Phong_cách_muốn_tạo, Model_dùng_để_train_tuỳ_chọn, Tăng_cường_Nội_dung_muốn_tạo, run_button ])