fl399 commited on
Commit
1381c4d
·
1 Parent(s): 870a50b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -156,11 +156,11 @@ def evaluate(
156
  # output = tokenizer.decode(s)
157
  output = query({
158
  "inputs": prompt
159
- })["generated_text"]
160
  elif llm == "flan-ul2":
161
  output = query({
162
  "inputs": prompt
163
- })["generated_text"]
164
 
165
  else:
166
  RuntimeError(f"No such LLM: {llm}")
@@ -182,7 +182,8 @@ def process_document(llm, image, question):
182
  res = evaluate(table, question, llm=llm)
183
  #return res + "\n\n" + res.split("A:")[-1]
184
  if llm == "alpaca-lora":
185
- return [table, res.split("A:")[-1]]
 
186
  else:
187
  return [table, res]
188
 
 
156
  # output = tokenizer.decode(s)
157
  output = query({
158
  "inputs": prompt
159
+ })
160
  elif llm == "flan-ul2":
161
  output = query({
162
  "inputs": prompt
163
+ })
164
 
165
  else:
166
  RuntimeError(f"No such LLM: {llm}")
 
182
  res = evaluate(table, question, llm=llm)
183
  #return res + "\n\n" + res.split("A:")[-1]
184
  if llm == "alpaca-lora":
185
+ #return [table, res.split("A:")[-1]]
186
+ return [table, res]
187
  else:
188
  return [table, res]
189