Fangyu Liu commited on
Commit
000d979
1 Parent(s): f9e72d0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -123,7 +123,7 @@ def evaluate(
123
  max_new_tokens=128,
124
  **kwargs,
125
  ):
126
- prompt = _TEMPLATE + "\n" + table + "\n" + "Q: " + question
127
  inputs = tokenizer(prompt, return_tensors="pt")
128
  input_ids = inputs["input_ids"].to(device)
129
  generation_config = GenerationConfig(
@@ -143,7 +143,7 @@ def evaluate(
143
  )
144
  s = generation_output.sequences[0]
145
  output = tokenizer.decode(s)
146
- #return output.split("### Response:")[1].strip()
147
  return output
148
 
149
 
 
123
  max_new_tokens=128,
124
  **kwargs,
125
  ):
126
+ prompt = _TEMPLATE + "\n" + _add_markup(table) + "\n" + "Q: " + question + "\n" + "A:"
127
  inputs = tokenizer(prompt, return_tensors="pt")
128
  input_ids = inputs["input_ids"].to(device)
129
  generation_config = GenerationConfig(
 
143
  )
144
  s = generation_output.sequences[0]
145
  output = tokenizer.decode(s)
146
+ #return output.split("A:")[-1].strip()
147
  return output
148
 
149