66
77from PySide6 .QtCore import Qt
88from PySide6 .QtWidgets import (
9+ QApplication ,
910 QCheckBox ,
1011 QComboBox ,
1112 QFormLayout ,
@@ -265,6 +266,8 @@ def build_dataset_plan_tab(window) -> QWidget:
265266 window .external_dataset_download_button = QPushButton ("Download latest dataset" )
266267 window ._tip (window .external_dataset_download_button , "Download, verify, and extract the latest dataset release into the install folder." )
267268 window .external_dataset_download_button .clicked .connect (window .download_latest_external_dataset )
269+ trial_mode = not bool (QApplication .instance ().property ("license_valid" ))
270+ window .external_dataset_download_button .setEnabled (not trial_mode )
268271 external_form .addRow ("Install folder" , window ._path_row (window .external_dataset_dir , directory = True ))
269272 external_form .addRow ("Status" , window .external_dataset_version )
270273 external_form .addRow ("" , window .external_dataset_download_button )
@@ -287,6 +290,7 @@ def build_dataset_plan_tab(window) -> QWidget:
287290 window .dataset_stage .setMaximumWidth (240 )
288291 window .include_conversation_datasets = QCheckBox ("Online" )
289292 window .include_conversation_datasets .setChecked (False )
293+ window .include_conversation_datasets .setEnabled (not trial_mode )
290294 purpose_row = QWidget ()
291295 purpose_layout = QHBoxLayout (purpose_row )
292296 purpose_layout .setContentsMargins (0 , 0 , 0 , 0 )
@@ -320,6 +324,7 @@ def build_dataset_plan_tab(window) -> QWidget:
320324 conversation_form .addRow ("Custom HF dataset" , window .custom_huggingface_dataset )
321325 window .custom_huggingface_download = QPushButton ("Download custom dataset" )
322326 window .custom_huggingface_download .clicked .connect (window ._download_custom_huggingface_dataset )
327+ window .custom_huggingface_download .setEnabled (not trial_mode )
323328 window ._tip (window .custom_huggingface_download , "Enable the custom dataset and download it during the next dataset preparation run." )
324329 conversation_form .addRow ("" , window .custom_huggingface_download )
325330 window .conversation_sample_limit = window ._spin (0 , 2_000_000 , 20000 )
@@ -455,4 +460,3 @@ def populate_default_data_tree(window: Any, root: Path) -> None:
455460 tree .blockSignals (False )
456461 if not window .default_data_actions :
457462 tree .addTopLevelItem (QTreeWidgetItem (["No project/default data files were found." , "" , "" ]))
458-
0 commit comments