Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -11,7 +11,8 @@ from transformers import AutoModelForCausalLM, AutoTokenizer
|
|
11 |
from share_btn import community_icon_html, loading_icon_html, share_js, share_btn_css
|
12 |
|
13 |
checkpoint = "smallcloudai/Refact-1_6B-fim"
|
14 |
-
device = "cuda"
|
|
|
15 |
|
16 |
tokenizer = AutoTokenizer.from_pretrained(checkpoint)
|
17 |
model = AutoModelForCausalLM.from_pretrained(checkpoint, trust_remote_code=True).to(device)
|
|
|
11 |
from share_btn import community_icon_html, loading_icon_html, share_js, share_btn_css
|
12 |
|
13 |
checkpoint = "smallcloudai/Refact-1_6B-fim"
|
14 |
+
device = "cuda"
|
15 |
+
device = "cpu" # for GPU usage or "cpu" for CPU usage
|
16 |
|
17 |
tokenizer = AutoTokenizer.from_pretrained(checkpoint)
|
18 |
model = AutoModelForCausalLM.from_pretrained(checkpoint, trust_remote_code=True).to(device)
|