Skip to content

Commit cfd78db

Browse files
authored
Fix build script (#93)
1 parent 6d5a1eb commit cfd78db

File tree

3 files changed

+17
-3
lines changed

3 files changed

+17
-3
lines changed

scripts/build_site.sh

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ if [[ ! -f $1 ]]; then
55
echo "cannot find config" $1
66
fi
77

8+
MLC_LLM_HOME_SET="${MLC_LLM_HOME:-}"
9+
10+
if [ -z ${MLC_LLM_HOME_SET} ]; then
11+
export MLC_LLM_HOME="${MLC_LLM_HOME:-mlc-llm}"
12+
fi
13+
814
rm -rf site/dist
915
mkdir -p site/dist site/_inlcudes
1016

@@ -15,9 +21,9 @@ cp web/llm_chat.html site/_includes
1521
cp web/llm_chat.js site/dist/
1622
cp web/llm_chat.css site/dist/
1723

18-
cp $MLC_LLM_HOME/dist/tvmjs_runtime.wasi.js site/dist
19-
cp $MLC_LLM_HOME/dist/tvmjs.bundle.js site/dist
20-
cp -r $MLC_LLM_HOME/dist/sentencepiece site/dist
24+
cp dist/tvmjs_runtime.wasi.js site/dist
25+
cp dist/tvmjs.bundle.js site/dist
26+
cp -r dist/sentencepiece site/dist
2127

2228
if [ -d "$MLC_LLM_HOME/dist/vicuna-v1-7b-q4f32_0/params" ]; then
2329
mkdir -p site/dist/vicuna-v1-7b-q4f32_0

site/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
dist
22
llm-chat-config.json
3+
global_config.json
34
_includes/stable_diffusion.html
45
_site

site/_includes/llm_chat.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@
2222
tvmjsGlobalEnv.sentencePieceProcessor = getTokenizer;
2323
</script>
2424

25+
<form>
26+
<select id="model-name">
27+
<option selected="selected">vicuna-v1-7b-q4f32_0</option>
28+
<!-- <option >dolly-v1-3b-q4f32_0</option> -->
29+
</select>
30+
</form>
31+
2532
<script src="dist/llm_chat.js"></script>
2633
<link href="dist/llm_chat.css" rel="stylesheet" type="text/css"/>
2734

0 commit comments

Comments
 (0)