1
+ # The HuggingFace model to use for testing
2
+ # hf_model = "ise-uiuc/Magicoder-S-DS-6.7B"
3
+ hf_model = "TheBloke/WizardCoder-Python-34B-V1.0-AWQ"
4
+
1
5
# Toggles whether UI should be run locally using gradio hot-reloading
2
6
# or should be included in the remote Helm install
3
7
run_ui_locally = True
@@ -13,7 +17,10 @@ chart_yaml = helm(
13
17
"chart/" ,
14
18
values = "hu-dev-values.yml" ,
15
19
# Enable/disable remote UI install depending on if we're running it locally
16
- set = "ui.enabled={}" .format (not str (run_ui_locally ).lower ()),
20
+ set = [
21
+ "huggingface.model={}" .format (hf_model ),
22
+ "ui.enabled={}" .format (not str (run_ui_locally ).lower ())
23
+ ],
17
24
)
18
25
k8s_yaml (chart_yaml )
19
26
@@ -32,10 +39,10 @@ if run_ui_locally:
32
39
local_resource (
33
40
name = "gradio-app-venv" ,
34
41
deps = [requirements ],
35
- cmd = "" .join ([
42
+ cmd = " && " .join ([
36
43
"([[ -d {} ]] || python3 -m venv {})" .format (venv_name , venv_name ),
37
- "&& source {}/bin/activate" .format (venv_name ),
38
- "&& pip install -r {}" .format (requirements ),
44
+ "source {}/bin/activate" .format (venv_name ),
45
+ "pip install -r {}" .format (requirements ),
39
46
])
40
47
)
41
48
@@ -44,8 +51,8 @@ if run_ui_locally:
44
51
name = "gradio-app" ,
45
52
deps = ["chart/web-app/" ],
46
53
resource_deps = ["gradio-app-venv" ],
47
- serve_cmd = "" .join ([
54
+ serve_cmd = " && " .join ([
48
55
"cd chart/web-app" ,
49
- "&& python app.py" ,
56
+ "python app.py {}" . format ( hf_model ) ,
50
57
])
51
58
)
0 commit comments