Spaces:
Build error
Build error
Commit
•
a4aa9e7
1
Parent(s):
ce7c64b
fix: batching logic
Browse files
app.py
CHANGED
@@ -52,11 +52,10 @@ def process_records_gradio(records, fields, question, example_records=None):
|
|
52 |
task.set_runtime_parameters(runtime_parameters)
|
53 |
|
54 |
results = []
|
55 |
-
print(records[0])
|
56 |
output = task.process(inputs=[{"record": record} for record in records])
|
57 |
-
|
58 |
-
for
|
59 |
-
entry =
|
60 |
if entry["suggestions"]:
|
61 |
results.append(entry["suggestions"])
|
62 |
|
|
|
52 |
task.set_runtime_parameters(runtime_parameters)
|
53 |
|
54 |
results = []
|
|
|
55 |
output = task.process(inputs=[{"record": record} for record in records])
|
56 |
+
output = next(output)
|
57 |
+
for idx in range(len(records)):
|
58 |
+
entry = output[idx]
|
59 |
if entry["suggestions"]:
|
60 |
results.append(entry["suggestions"])
|
61 |
|