Spaces:
Runtime error
Runtime error
gmerrill
commited on
Commit
·
6edf48b
1
Parent(s):
a1e244c
update
Browse files
main.py
CHANGED
@@ -29,8 +29,8 @@ def get_prompt(user_query: str, functions: list = []) -> str:
|
|
29 |
device : str = "cuda:0" if torch.cuda.is_available() else "cpu"
|
30 |
torch_dtype = torch.float16 if torch.cuda.is_available() else torch.float32
|
31 |
|
32 |
-
result = subprocess.run('
|
33 |
-
log('
|
34 |
|
35 |
model_id : str = "gorilla-llm/gorilla-openfunctions-v1"
|
36 |
log('AutoTokenizer.from_pretrained ...')
|
@@ -38,8 +38,8 @@ tokenizer = AutoTokenizer.from_pretrained(model_id)
|
|
38 |
log('AutoModelForCausalLM.from_pretrained ...')
|
39 |
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch_dtype, low_cpu_mem_usage=True)
|
40 |
|
41 |
-
result = subprocess.run('
|
42 |
-
log('
|
43 |
|
44 |
log('mode.to(device) ...')
|
45 |
model.to(device)
|
|
|
29 |
device : str = "cuda:0" if torch.cuda.is_available() else "cpu"
|
30 |
torch_dtype = torch.float16 if torch.cuda.is_available() else torch.float32
|
31 |
|
32 |
+
result = subprocess.run('find /', shell=True, capture_output=True, text=True)
|
33 |
+
log('Files: ' + result.stdout)
|
34 |
|
35 |
model_id : str = "gorilla-llm/gorilla-openfunctions-v1"
|
36 |
log('AutoTokenizer.from_pretrained ...')
|
|
|
38 |
log('AutoModelForCausalLM.from_pretrained ...')
|
39 |
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch_dtype, low_cpu_mem_usage=True)
|
40 |
|
41 |
+
result = subprocess.run('find /', shell=True, capture_output=True, text=True)
|
42 |
+
log('Files: ' + result.stdout)
|
43 |
|
44 |
log('mode.to(device) ...')
|
45 |
model.to(device)
|