ksvmuralidhar commited on
Commit
ee654a6
1 Parent(s): 79c0022

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -236,7 +236,7 @@ def summ_inference(txt: str):
236
  txt = summ_preprocess(txt)
237
  inference_tokenizer, tokenized_data = summ_inference_tokenize(input_=[txt], n_tokens=SUMM_INPUT_N_TOKENS)
238
  pred = summ_model.generate(**tokenized_data, max_new_tokens=SUMM_TARGET_N_TOKENS)
239
- result = "" if txt=="" else clean_summary(inference_tokenizer.decode(pred, skip_special_tokens=True))
240
  return result
241
  ############ SUMMARIZATION MODEL & VARS INITIALIZATION END ####################
242
 
 
236
  txt = summ_preprocess(txt)
237
  inference_tokenizer, tokenized_data = summ_inference_tokenize(input_=[txt], n_tokens=SUMM_INPUT_N_TOKENS)
238
  pred = summ_model.generate(**tokenized_data, max_new_tokens=SUMM_TARGET_N_TOKENS)
239
+ result = "" if txt=="" else clean_summary(inference_tokenizer.decode(pred[0], skip_special_tokens=True))
240
  return result
241
  ############ SUMMARIZATION MODEL & VARS INITIALIZATION END ####################
242