Skip to content

Commit

Permalink
detail
Browse files Browse the repository at this point in the history
  • Loading branch information
yiboyasss committed Jul 11, 2024
1 parent 402d856 commit 0c919b8
Showing 1 changed file with 31 additions and 22 deletions.
53 changes: 31 additions & 22 deletions xinference/web/ui/src/scenes/launch_model/modelCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ const ModelCard = ({
const modelDataWithID =
modelType === 'LLM' ? modelDataWithID_LLM : modelDataWithID_other

console.log('modelDataWithID----', modelDataWithID);
console.log('modelDataWithID----', modelDataWithID)

// First fetcher request to initiate the model
fetchWrapper
Expand Down Expand Up @@ -617,7 +617,13 @@ const ModelCard = ({
}
setCustomArr(customData)

if (model_uid || request_limits || worker_ip || gpu_idx?.join(',') || download_hub)
if (
model_uid ||
request_limits ||
worker_ip ||
gpu_idx?.join(',') ||
download_hub
)
setIsOther(true)

if (
Expand Down Expand Up @@ -1347,31 +1353,34 @@ const ModelCard = ({
</Grid>
<Grid item xs={12}>
<FormControl variant="outlined" margin="normal" fullWidth>
<InputLabel id="quantization-label">
(Optional) Download_hub
</InputLabel>
<Select
labelId="download_hub-label"
value={downloadHub}
onChange={(e) => setDownloadHub(e.target.value)}
label="(Optional) Download_hub"
>
{["huggingface", "modelscope", "csghub"].map(item => {
return (
<MenuItem key={item} value={item}>
{item}
</MenuItem>
)
})}
</Select>
<InputLabel id="quantization-label">
(Optional) Download_hub
</InputLabel>
<Select
labelId="download_hub-label"
value={downloadHub}
onChange={(e) => setDownloadHub(e.target.value)}
label="(Optional) Download_hub"
>
{['huggingface', 'modelscope', 'csghub'].map((item) => {
return (
<MenuItem key={item} value={item}>
{item}
</MenuItem>
)
})}
</Select>
</FormControl>
</Grid>
<ListItemButton
onClick={() => setIsPeftModelConfig(!isPeftModelConfig)}
>
<div style={{ display: 'flex', alignItems: 'center' }}>
<ListItemText primary="Lora Config" style={{ marginRight: 10 }} />
{isPeftModelConfig ? <ExpandLess /> : <ExpandMore />}
<ListItemText
primary="Lora Config"
style={{ marginRight: 10 }}
/>
{isPeftModelConfig ? <ExpandLess /> : <ExpandMore />}
</div>
</ListItemButton>
<Collapse
Expand Down Expand Up @@ -1518,7 +1527,7 @@ const ModelCard = ({
onChange={(e) => setDownloadHub(e.target.value)}
label="(Optional) Download_hub"
>
{["huggingface", "modelscope"].map(item => {
{['huggingface', 'modelscope'].map((item) => {
return (
<MenuItem key={item} value={item}>
{item}
Expand Down

0 comments on commit 0c919b8

Please sign in to comment.