Download testbed/fairlearn__fairlearn/fairlearn/widget/js/src/labplugin.ts from hc99/FEA-Bench: direct link, hf CLI and curl.
- Browser
- Download file 954 Bytes
-
https://huggingface.co/datasets/hc99/FEA-Bench/resolve/main/testbed/fairlearn__fairlearn/fairlearn/widget/js/src/labplugin.ts
- Command line
-
hf download hf://datasets/hc99/FEA-Bench/testbed/fairlearn__fairlearn/fairlearn/widget/js/src/labplugin.ts
-
curl -L -o labplugin.ts https://huggingface.co/datasets/hc99/FEA-Bench/resolve/main/testbed/fairlearn__fairlearn/fairlearn/widget/js/src/labplugin.ts
954 Bytes
| import { FairlearnModel, FairlearnView} from './fairlearnDashboard'; | |
| import {Application, IPlugin} from '@phosphor/application'; | |
| import {Widget} from '@phosphor/widgets'; | |
| import {IJupyterWidgetRegistry} from '@jupyter-widgets/base'; | |
| const EXTENSION_ID = 'interpret-ml-widget:plugin'; | |
| const fairlearnDashboardPlugin: IPlugin<Application<Widget>, void> = { | |
| id: EXTENSION_ID, | |
| requires: [IJupyterWidgetRegistry], | |
| activate: activateWidgetExtension, | |
| autoStart: true | |
| }; | |
| export default fairlearnDashboardPlugin; | |
| const data = require('../package.json'); | |
| /** | |
| * Activate the widget extension. | |
| */ | |
| function activateWidgetExtension(app: Application<Widget>, registry: IJupyterWidgetRegistry): void { | |
| registry.registerWidget({ | |
| name: 'interpret-ml-widget', | |
| version: data.version, | |
| exports: { | |
| FairlearnModel: FairlearnModel, | |
| FairlearnView: FairlearnView | |
| } as any | |
| }); | |
| } |