injilashah commited on
Commit
66be467
·
verified ·
1 Parent(s): 340ab8d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -16,12 +16,12 @@ def Sentence_Commpletion(model_name, input):
16
 
17
  if model_name == "Bloom":
18
  tokenizer, model = b_tokenizer, b_model
19
- inputid = tokenizer(input, return_tensors="pt")
20
- outputs = model.generate(inputs.inputid, max_length=30, num_return_sequences=1)
21
  elif model_name == "Gemma":
22
  tokenizer, model = g_tokenizer, g_model
23
- inputid = Tokenizer(input, return_tensors="pt")
24
- outputs = Model.generate(**inputid, max_new_tokens=20)
25
  return tokenizer.decode(outputs[0])
26
 
27
 
 
16
 
17
  if model_name == "Bloom":
18
  tokenizer, model = b_tokenizer, b_model
19
+ inputs = tokenizer(input, return_tensors="pt")
20
+ outputs = model.generate(inputs.input_id, max_length=30, num_return_sequences=1)
21
  elif model_name == "Gemma":
22
  tokenizer, model = g_tokenizer, g_model
23
+ inputs = Tokenizer(input, return_tensors="pt")
24
+ outputs = Model.generate(**input_id, max_new_tokens=20)
25
  return tokenizer.decode(outputs[0])
26
 
27