Skip to content

Commit

Permalink
fix: detail
Browse files Browse the repository at this point in the history
  • Loading branch information
yiboyasss committed Aug 5, 2024
1 parent 1fff215 commit 3dbba0a
Showing 1 changed file with 17 additions and 19 deletions.
36 changes: 17 additions & 19 deletions xinference/web/ui/src/scenes/launch_model/modelCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -363,17 +363,15 @@ const ModelCard = ({
const modelDataWithID =
modelType === 'LLM' ? modelDataWithID_LLM : modelDataWithID_other

console.log('modelDataWithID', modelDataWithID);

// First fetcher request to initiate the model
// fetchWrapper
// .post('/v1/models', modelDataWithID)
// .then(() => {
// navigate(`/running_models/${modelType}`)
// sessionStorage.setItem(
// 'runningModelType',
// `/running_models/${modelType}`
// )
fetchWrapper
.post('/v1/models', modelDataWithID)
.then(() => {
navigate(`/running_models/${modelType}`)
sessionStorage.setItem(
'runningModelType',
`/running_models/${modelType}`
)
let historyArr = JSON.parse(localStorage.getItem('historyArr')) || []
if (!historyArr.some((item) => deepEqual(item, modelDataWithID))) {
historyArr = historyArr.filter(
Expand All @@ -383,15 +381,15 @@ const ModelCard = ({
}
localStorage.setItem('historyArr', JSON.stringify(historyArr))

// setIsCallingApi(false)
// })
// .catch((error) => {
// console.error('Error:', error)
// if (error.response.status !== 403) {
// setErrorMsg(error.message)
// }
// setIsCallingApi(false)
// })
setIsCallingApi(false)
})
.catch((error) => {
console.error('Error:', error)
if (error.response.status !== 403) {
setErrorMsg(error.message)
}
setIsCallingApi(false)
})
}

const handleGPUIdx = (data) => {
Expand Down

0 comments on commit 3dbba0a

Please sign in to comment.