Omnibus commited on
Commit
b7c0853
1 Parent(s): d630d87

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -9
app.py CHANGED
@@ -7,17 +7,17 @@ def fmt_prompt(prompt: str) -> str:
7
  return f"""[Instructions]:\n{prompt}\n\n[Response]:"""
8
 
9
 
10
-
11
- model_name = "abacaj/starcoderbase-1b-sft"
12
- tokenizer = transformers.AutoTokenizer.from_pretrained(model_name)
13
 
14
- model = (
15
- transformers.AutoModelForCausalLM.from_pretrained(
16
- model_name,
17
- )
18
- .to("cuda:0")
19
- .eval()
20
  )
 
 
 
21
  def chat_fn(prompt):
22
  #prompt = "Write a python function to sort the following array in ascending order, don't use any built in sorting methods: [9,2,8,1,5]"
23
  prompt_input = fmt_prompt(prompt)
 
7
  return f"""[Instructions]:\n{prompt}\n\n[Response]:"""
8
 
9
 
 
 
 
10
 
11
+ model_name = "abacaj/starcoderbase-1b-sft"
12
+ tokenizer = transformers.AutoTokenizer.from_pretrained(model_name)
13
+
14
+ model = (
15
+ transformers.AutoModelForCausalLM.from_pretrained(
16
+ model_name,
17
  )
18
+ .to("cuda:0")
19
+ .eval()
20
+ )
21
  def chat_fn(prompt):
22
  #prompt = "Write a python function to sort the following array in ascending order, don't use any built in sorting methods: [9,2,8,1,5]"
23
  prompt_input = fmt_prompt(prompt)