Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: custom models on the web ui #1259

Merged
merged 2 commits into from
Apr 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion xinference/web/ui/src/scenes/launch_model/launchCustom.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ const LaunchCustom = ({ gpuAvailable }) => {
display: 'grid',
gridTemplateColumns: 'repeat(auto-fill, minmax(300px, 1fr))',
paddingLeft: '2rem',
paddingTop: '2rem',
paddingBottom: '2rem',
gridGap: '2rem 0rem',
}

Expand Down Expand Up @@ -188,10 +188,12 @@ const LaunchCustom = ({ gpuAvailable }) => {
) {
return (
<ModelCard
key={filteredRegistration.model_name}
url={endPoint}
modelData={filteredRegistration}
gpuAvailable={gpuAvailable}
is_custom={true}
modelType="LLM"
/>
)
}
Expand Down Expand Up @@ -227,9 +229,11 @@ const LaunchCustom = ({ gpuAvailable }) => {
) {
return (
<ModelCard
key={filteredRegistration.model_name}
url={endPoint}
modelData={filteredRegistration}
is_custom={true}
modelType="embedding"
/>
)
}
Expand Down Expand Up @@ -265,9 +269,11 @@ const LaunchCustom = ({ gpuAvailable }) => {
) {
return (
<ModelCard
key={filteredRegistration.model_name}
url={endPoint}
modelData={filteredRegistration}
is_custom={true}
modelType="rerank"
/>
)
}
Expand Down
14 changes: 2 additions & 12 deletions xinference/web/ui/src/scenes/launch_model/modelCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -336,12 +336,7 @@ const ModelCard = ({
{modelType === 'LLM' ? (
<Box style={styles.descriptionCard}>
{is_custom && (
<Stack
direction="row"
justifyContent="space-evenly"
alignItems="center"
spacing={1}
>
<Stack direction="row" spacing={1} useFlexGap>
<TitleTypography value={modelData.model_name} />
<IconButton
aria-label="delete"
Expand Down Expand Up @@ -419,12 +414,7 @@ const ModelCard = ({
<Box style={styles.descriptionCard}>
<div style={styles.titleContainer}>
{is_custom && (
<Stack
direction="row"
justifyContent="space-evenly"
alignItems="center"
spacing={1}
>
<Stack direction="row" spacing={1} useFlexGap>
<TitleTypography value={modelData.model_name} />
<IconButton
aria-label="delete"
Expand Down
Loading