akash418 commited on
Commit
96e7dc5
·
1 Parent(s): fce4fd9
Files changed (1) hide show
  1. app.py +10 -2
app.py CHANGED
@@ -51,8 +51,16 @@ def inference(input_sentence, max_length, sample_or_greedy, seed=42):
51
  }
52
 
53
  payload = {"inputs": input_sentence, "parameters": parameters,"options" : {"use_cache": False} }
54
- model_identifier = 'bigscience/bloomz-560m'
55
- pipe = pipeline("text-generation", model = model_identifier, tokenizer = model_identifier,max_new_tokens = 23, do_sample = False, length_penalty = 0.0, early_stopping = False, eos_token_id = None)
 
 
 
 
 
 
 
 
56
  res = pipe(input_sentence)
57
 
58
 
 
51
  }
52
 
53
  payload = {"inputs": input_sentence, "parameters": parameters,"options" : {"use_cache": False} }
54
+ model_name = 'bigscience/bloomz-560m'
55
+ pipe = pipeline("text-generation",
56
+ model = model_name,
57
+ tokenizer = model_name,
58
+ max_new_tokens = max_length,
59
+ do_sample = False,
60
+ length_penalty = 0.0,
61
+ early_stopping = False,
62
+ eos_token_id = None
63
+ )
64
  res = pipe(input_sentence)
65
 
66