Spaces:
Runtime error
Runtime error
Fangyu Liu
commited on
Commit
•
000d979
1
Parent(s):
f9e72d0
Update app.py
Browse files
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("
|
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 |
|