upload model runner.exe
This commit is contained in:
Родитель
06c52548b6
Коммит
0b4fd6bb71
|
@ -38,6 +38,7 @@ public/*
|
|||
!public/ConverterView.png
|
||||
!public/EditorView.png
|
||||
!public/progress_bar.gif
|
||||
!public/WinMLRunner.exe
|
||||
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
|
|
Двоичный файл не отображается.
|
@ -137,9 +137,9 @@ class RunView extends React.Component<IComponentProperties, IComponentState> {
|
|||
return (
|
||||
<div className="Arguments">
|
||||
<div className='DisplayFlex ModelPath'>
|
||||
<label className="label">Input Path: </label>
|
||||
<label className="label">Model Path: </label>
|
||||
<TextField id='modelToRun' placeholder='Model Path' value={this.state.model} onChanged={this.setModel} />
|
||||
<DefaultButton id='InputPathBrowse' text='Browse' onClick={this.browseSource}/>
|
||||
<DefaultButton id='ModelPathBrowse' text='Browse' onClick={this.browseModel}/>
|
||||
</div>
|
||||
<br />
|
||||
<div className='DisplayFlex Device'>
|
||||
|
@ -164,7 +164,7 @@ class RunView extends React.Component<IComponentProperties, IComponentState> {
|
|||
<div className='DisplayFlex Input'>
|
||||
<label className="label">Input Path: </label>
|
||||
<TextField id='InputPath' placeholder='(Optional) image/csv Path' value={this.state.inputPath} onChanged={this.setInputPath} />
|
||||
<DefaultButton id='InputPathBrowse' text='Browse' onClick={this.browseSource}/>
|
||||
<DefaultButton id='InputPathBrowse' text='Browse' onClick={this.browseInput}/>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
|
@ -220,7 +220,7 @@ class RunView extends React.Component<IComponentProperties, IComponentState> {
|
|||
|
||||
this.setState({parameters: tempParameters})
|
||||
}
|
||||
private browseSource = () => {
|
||||
private browseModel = () => {
|
||||
const openDialogOptions = {
|
||||
properties: Array<'openFile'>('openFile'),
|
||||
};
|
||||
|
@ -232,6 +232,19 @@ class RunView extends React.Component<IComponentProperties, IComponentState> {
|
|||
});
|
||||
}
|
||||
|
||||
private browseInput = () => {
|
||||
const openDialogOptions = {
|
||||
properties: Array<'openFile'>('openFile'),
|
||||
};
|
||||
showNativeOpenDialog(openDialogOptions)
|
||||
.then((filePaths) => {
|
||||
if (filePaths) {
|
||||
this.setInputPath(filePaths[0]);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
private printError = (error: string | Error) => {
|
||||
const message = typeof error === 'string' ? error : (`${error.stack ? `${error.stack}: ` : ''}${error.message}`);
|
||||
this.printMessage(message)
|
||||
|
|
Загрузка…
Ссылка в новой задаче