Commit
·
9195d73
1
Parent(s):
5424de0
Upload run code.toml
Browse files- repo/run code.toml +45 -0
repo/run code.toml
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import os
|
2 |
+
import shutil
|
3 |
+
from IPython.utils import capture
|
4 |
+
import ipywidgets as widgets
|
5 |
+
from IPython.display import display
|
6 |
+
|
7 |
+
# Create text input widgets for the parameters
|
8 |
+
v_parameterization = widgets.Checkbox(description='v_parameterization', value=False)
|
9 |
+
Tên_Lora = widgets.Text(value="japandi interior", description='Tên Lora:')
|
10 |
+
Thư_mục_chứa_hình_ảnh_đầu_vào = Tên_Lora
|
11 |
+
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:')
|
12 |
+
Model_dùng_để_train_tuỳ_chọn = widgets.Text(value="", description='Model dùng để train tuỳ chọn:')
|
13 |
+
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:')
|
14 |
+
Loại_nội_dung = Tăng_cường_Nội_dung_muốn_tạo
|
15 |
+
|
16 |
+
# Create a button widget
|
17 |
+
run_button = widgets.Button(description='Run')
|
18 |
+
|
19 |
+
# Define a function to handle the button click event
|
20 |
+
def run_button_clicked(button):
|
21 |
+
v2 = False
|
22 |
+
v_parameterization_value = v_parameterization.value
|
23 |
+
Tên_Lora_value = Tên_Lora.value
|
24 |
+
Thư_mục_chứa_hình_ảnh_đầu_vào_value = Thư_mục_chứa_hình_ảnh_đầu_vào.value
|
25 |
+
Thư_mục_chứa_Lora_sau_khi_train_value = Thư_mục_chứa_Lora_sau_khi_train.value
|
26 |
+
Phong_cách_muốn_tạo_value = Phong_cách_muốn_tạo.value
|
27 |
+
Model_dùng_để_train_tuỳ_chọn_value = Model_dùng_để_train_tuỳ_chọn.value
|
28 |
+
Tăng_cường_Nội_dung_muốn_tạo_value = Tăng_cường_Nội_dung_muốn_tạo.value
|
29 |
+
Loại_nội_dung_value = Loại_nội_dung.value
|
30 |
+
|
31 |
+
# Rest of the code...
|
32 |
+
|
33 |
+
# Register the function to handle the button click event
|
34 |
+
run_button.on_click(run_button_clicked)
|
35 |
+
|
36 |
+
# Display the widgets
|
37 |
+
widgets.VBox([
|
38 |
+
v_parameterization,
|
39 |
+
Tên_Lora,
|
40 |
+
Thư_mục_chứa_hình_ảnh_đầu_vào,
|
41 |
+
Phong_cách_muốn_tạo,
|
42 |
+
Model_dùng_để_train_tuỳ_chọn,
|
43 |
+
Tăng_cường_Nội_dung_muốn_tạo,
|
44 |
+
run_button
|
45 |
+
])
|