injilashah commited on
Commit
3f51521
·
verified ·
1 Parent(s): 5e32214

Update app.py

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