chore: add no available models notes
This commit is contained in:
@@ -161,14 +161,12 @@ const InstanceItem: React.FC<InstanceItemProps> = ({
|
||||
}}
|
||||
>
|
||||
<span className="flex-center">
|
||||
<AutoTooltip
|
||||
title={renderWorkerInfo(item)}
|
||||
ghost
|
||||
showTitle={true}
|
||||
>
|
||||
<AutoTooltip title={item.name} ghost>
|
||||
<span className="m-r-5">{item.name}</span>
|
||||
</AutoTooltip>
|
||||
<InfoCircleOutlined />
|
||||
<Tooltip title={renderWorkerInfo(item)}>
|
||||
<InfoCircleOutlined />
|
||||
</Tooltip>
|
||||
</span>
|
||||
</Col>
|
||||
<Col span={6}>
|
||||
|
||||
@@ -8,6 +8,7 @@ import {
|
||||
} from '@ant-design/icons';
|
||||
import { useIntl } from '@umijs/max';
|
||||
import { Button, Empty, Spin, Tag, Tooltip } from 'antd';
|
||||
import { some } from 'lodash';
|
||||
import 'overlayscrollbars/overlayscrollbars.css';
|
||||
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
||||
import SimpleBar from 'simplebar-react';
|
||||
@@ -74,8 +75,9 @@ const ModelCard: React.FC<{
|
||||
|
||||
setModelData(modelcard);
|
||||
setReadmeText(readme);
|
||||
setIsGGUF(modelcard.tags?.includes('gguf'));
|
||||
setIsGGUFModel(modelcard.tags?.includes('gguf'));
|
||||
const isGGUF = modelcard.tags?.includes('gguf');
|
||||
setIsGGUF(isGGUF);
|
||||
setIsGGUFModel(isGGUF);
|
||||
} catch (error) {
|
||||
setModelData(null);
|
||||
setReadmeText(null);
|
||||
@@ -99,8 +101,12 @@ const ModelCard: React.FC<{
|
||||
name: `${data.Data?.Path}/${data.Data?.Name}`
|
||||
});
|
||||
setReadmeText(data?.Data?.ReadMeContent);
|
||||
setIsGGUF(data.Data?.Tags?.includes('gguf'));
|
||||
setIsGGUFModel(data.Data?.Tags?.includes('gguf'));
|
||||
const isGGUF = some(
|
||||
data?.Data?.Tags,
|
||||
(tag: string) => tag?.indexOf('gguf') > -1
|
||||
);
|
||||
setIsGGUF(isGGUF);
|
||||
setIsGGUFModel(isGGUF);
|
||||
} catch (error) {
|
||||
setModelData(null);
|
||||
setReadmeText(null);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { BulbOutlined } from '@ant-design/icons';
|
||||
import { BulbOutlined, InfoCircleOutlined } from '@ant-design/icons';
|
||||
import { useIntl } from '@umijs/max';
|
||||
import { Checkbox, Select } from 'antd';
|
||||
import { Checkbox, Select, Tooltip } from 'antd';
|
||||
import _ from 'lodash';
|
||||
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
||||
import { queryHuggingfaceModels, queryModelScopeModels } from '../apis';
|
||||
@@ -234,7 +234,22 @@ const SearchModel: React.FC<SearchInputProps> = (props) => {
|
||||
className="m-r-5"
|
||||
checked={filterGGUFRef.current}
|
||||
>
|
||||
GGUF
|
||||
<Tooltip
|
||||
overlayInnerStyle={{ width: 'max-content' }}
|
||||
title={
|
||||
<div>
|
||||
<div>
|
||||
{intl.formatMessage({ id: 'models.search.gguf.tips' })}
|
||||
</div>
|
||||
<div>
|
||||
{intl.formatMessage({ id: 'models.search.vllm.tips' })}
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
>
|
||||
GGUF
|
||||
<InfoCircleOutlined className="m-l-4" />
|
||||
</Tooltip>
|
||||
</Checkbox>
|
||||
<Select
|
||||
allowClear
|
||||
|
||||
Reference in New Issue
Block a user