) dku_config.add_param( name='text_direction', value=config.get('text_direction'), checks=[{ 'type': 'in', 'op': ['rtl', 'ltr'] }], required=(dku_config.language == "none") ) dku_config.add_param( name='tokenization_engine', value=config.get('tokenization_engine'), checks=[{ 'type': 'in', 'op': ['white_space', 'char'] }], required=(dku_config.language == "none") ) return dku_config config = get_webapp_config() dku_config = create_dku_config(config) prepare_datasets(dku_config) initial_df = dataiku.Dataset(config["unlabeled"]).get_dataframe() queries_df = None define_endpoints(app, DataikuLALHandler(TextClassifier(initial_df, queries_df, dku_config), dku_config))
import dataiku from dataiku.customwebapp import get_webapp_config from lal.api import define_endpoints from lal.app_configuration import prepare_datasets from lal.classifiers.image_object_classifier import ImageObjectClassifier from lal.handlers.dataiku_lal_handler import DataikuLALHandler config = get_webapp_config() labels_schema = [{"name": "path", "type": "string"}] prepare_datasets(config, labels_schema) unlabeled_mf = dataiku.Folder(config["unlabeled"]) queries_df = dataiku.Dataset( config["queries_ds"]).get_dataframe() if "queries_ds" in config else None define_endpoints( app, DataikuLALHandler(ImageObjectClassifier(unlabeled_mf, queries_df, config), config))
import dataiku from dataiku.customwebapp import get_webapp_config from lal.api import define_endpoints from lal.app_configuration import prepare_datasets from lal.classifiers.tabular_classifier import TabularClassifier from lal.handlers.dataiku_lal_handler import DataikuLALHandler config = get_webapp_config() prepare_datasets(config) initial_df = dataiku.Dataset(config["unlabeled"]).get_dataframe() queries_df = dataiku.Dataset( config["queries_ds"]).get_dataframe() if "queries_ds" in config else None define_endpoints( app, DataikuLALHandler(TabularClassifier(initial_df, queries_df, config), config))