chsubhasis commited on
Commit
706a667
·
1 Parent(s): 0b71534

app and requirements files added

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -34,7 +34,10 @@ def generate_response(model, tokenizer, prompt, max_length=200):
34
  pad_token_id=pad_token_id
35
  )
36
 
37
- return tokenizer.decode(output[0], skip_special_tokens=True)
 
 
 
38
 
39
  def generate_query_response(prompt, max_length=200):
40
 
 
34
  pad_token_id=pad_token_id
35
  )
36
 
37
+ #return tokenizer.decode(output[0], skip_special_tokens=True)
38
+ generated_text = tokenizer.decode(output[0], skip_special_tokens=True)
39
+ generated_text = generated_text.replace("<answer>", " ").replace("<end>", " ")
40
+ return generated_text
41
 
42
  def generate_query_response(prompt, max_length=200):
43