fix: ui of picker component, enhance NLU model
This commit is contained in:
parent
bfcf76fdc2
commit
2265344952
@ -117,8 +117,8 @@ const PickerList = React.forwardRef<HTMLDivElement, PickerListProps>((props, ref
|
||||
return createPortal(
|
||||
<div
|
||||
ref={ref}
|
||||
className="absolute w-fit text-white opacity-0 duration-200
|
||||
bg-gray-300 dark:bg-zinc-700 px-2 py-2 rounded-xl text-align-left scale-[.85]"
|
||||
className="absolute w-fit text-black dark:text-white opacity-0 duration-200
|
||||
bg-zinc-50 shadow-lg border-1 border-zinc-200 dark:border-zinc-600 dark:bg-zinc-700 px-2 py-2 rounded-xl text-align-left scale-[.85]"
|
||||
style={{ transformOrigin: "top center" }}
|
||||
>
|
||||
{Object.keys(selectionItems).map((key: string, index) => {
|
||||
@ -126,7 +126,7 @@ const PickerList = React.forwardRef<HTMLDivElement, PickerListProps>((props, ref
|
||||
<div
|
||||
key={index}
|
||||
className="relative py-2 w-full min-w-32 pl-2 cursor-pointer rounded-lg
|
||||
hover:bg-zinc-400 dark:hover:bg-zinc-600 flex justify-between items-center"
|
||||
hover:bg-zinc-200 dark:hover:bg-zinc-600 flex justify-between items-center"
|
||||
onClick={() => {
|
||||
selectionOnChange(key);
|
||||
props.toggleDisplay();
|
||||
|
@ -119,6 +119,9 @@
|
||||
|
||||
"None": [
|
||||
"你好",
|
||||
"为什么计算机使用二进制"
|
||||
"为什么计算机使用二进制",
|
||||
"什么是",
|
||||
"热",
|
||||
"怎么"
|
||||
]
|
||||
}
|
||||
|
@ -56,11 +56,6 @@ export async function trainIntentionModel() {
|
||||
|
||||
await manager.train();
|
||||
|
||||
// let actual = await manager.process("en", "base64 decode bilibili");
|
||||
// console.log(actual);
|
||||
// let actualZH = await manager.process("zh", "去除百分号");
|
||||
// console.log(actualZH);
|
||||
|
||||
const resultModel = manager.toJSON();
|
||||
|
||||
const buf = fflate.strToU8(JSON.stringify(resultModel));
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "sparkhome",
|
||||
"private": false,
|
||||
"version": "5.2.0",
|
||||
"version": "5.2.1",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "bun server.ts",
|
||||
|
BIN
public/model
BIN
public/model
Binary file not shown.
Loading…
Reference in New Issue
Block a user