Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -156,11 +156,11 @@ def evaluate(
|
|
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,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 |
|