Open kaushalvivek opened 4 years ago
checkDeploymentStatus(modelId) { var xhr = new XMLHttpRequest() xhr.addEventListener('load', () => { if (xhr.responseText ==="deployed") { this.setState({ isModelDeployed: true, modelInferenceAPI: MODEL_INFERENCE_API+'/'+this.props.modelVersion.run_id, }); } else { this.setState({ isModelDeployed: false, modelInferenceAPI: "Nor Deployed", }); } }); xhr.open('GET',MODEL_DEPLOYMENT_URL+"?runId="+modelId) xhr.send() }
This would update the state, but the state would not be reflected in the toggle.
This would update the state, but the state would not be reflected in the toggle.