sandz7 commited on
Commit
2132820
·
1 Parent(s): 36552b6

removed the headers from the text output generated by model

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -46,7 +46,8 @@ def xgen(input_text,
46
  # Decode the output tensors into string
47
  outputs_decoded = tokenizer.decode(outputs[0], skip_special_tokens=True)
48
 
49
- output_text = outputs_decoded.strip().replace("Assistant:", "")
 
50
 
51
  return output_text
52
 
 
46
  # Decode the output tensors into string
47
  outputs_decoded = tokenizer.decode(outputs[0], skip_special_tokens=True)
48
 
49
+ # Remove header from the output
50
+ output_text = outputs_decoded.replace(header, "").strip()
51
 
52
  return output_text
53