Yash Sachdeva commited on
Commit
6254e11
·
1 Parent(s): 72231f4
Files changed (1) hide show
  1. question_paper.py +3 -3
question_paper.py CHANGED
@@ -11,12 +11,12 @@ MODEL = None
11
  TOKENIZER = None
12
 
13
  @app.get("/")
14
- def llama():
15
- prompt = [{'role': 'user', 'content': 'List 3 synonyms for the word "tiny"'}]
16
  inputs = TOKENIZER.apply_chat_template( prompt, add_generation_prompt=True, return_tensors='pt' )
17
 
18
  tokens = MODEL.generate( inputs.to(MODEL.device), max_new_tokens=1024, temperature=0.3, do_sample=True)
19
-
20
  tresponse = TOKENIZER.decode(tokens[0], skip_special_tokens=False)
21
  print(tresponse)
22
 
 
11
  TOKENIZER = None
12
 
13
  @app.get("/")
14
+ def llama(input):
15
+ prompt = [{'role': 'user', 'content': input}]
16
  inputs = TOKENIZER.apply_chat_template( prompt, add_generation_prompt=True, return_tensors='pt' )
17
 
18
  tokens = MODEL.generate( inputs.to(MODEL.device), max_new_tokens=1024, temperature=0.3, do_sample=True)
19
+
20
  tresponse = TOKENIZER.decode(tokens[0], skip_special_tokens=False)
21
  print(tresponse)
22