-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add function to switch between downloaded models (#70)
* add dropdown element for select model Signed-off-by: cbh778899 <[email protected]> * implement model switch & hide reset everytime Signed-off-by: cbh778899 <[email protected]> * update style Signed-off-by: cbh778899 <[email protected]> * fix llama_reset_everytime issue so we can normally reset now Signed-off-by: cbh778899 <[email protected]> --------- Signed-off-by: cbh778899 <[email protected]>
- Loading branch information
Showing
6 changed files
with
112 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
export default function DropdownComponent({ cb, value, title, description }) { | ||
return ( | ||
<div className="component"> | ||
<div className="title">{title}</div> | ||
{ description && <div className="description">{description}</div> } | ||
<select | ||
className="main-part" | ||
onClick={evt=>evt.preventDefault()} | ||
onChange={evt=>cb && cb(evt.target.value)} | ||
> | ||
{ value.map((e, i)=>{ | ||
let title, value; | ||
if(typeof e === "object") { | ||
title = e.title; | ||
value = e.value; | ||
} else { | ||
title = e; | ||
value = e; | ||
} | ||
return <option key={`option-${i}`} value={value}>{ title }</option> | ||
}) } | ||
</select> | ||
</div> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters