Update functions.py
Browse files- functions.py +4 -9
functions.py
CHANGED
|
@@ -508,18 +508,13 @@ def generate_eval(raw_text, N, chunk):
|
|
| 508 |
eval_set = []
|
| 509 |
for i, b in enumerate(sub_sequences):
|
| 510 |
ques_update = st.empty()
|
| 511 |
-
|
| 512 |
-
|
| 513 |
-
|
| 514 |
-
|
| 515 |
-
ques_update.info("Creating Question:",i+1)
|
| 516 |
-
except Exception as e:
|
| 517 |
-
warn_update.info('Error generating question %s.' % str(i+1))
|
| 518 |
-
#st.write(e)
|
| 519 |
eval_set_full = list(itertools.chain.from_iterable(eval_set))
|
| 520 |
|
| 521 |
update.empty()
|
| 522 |
-
warn_update.empty()
|
| 523 |
ques_update.empty()
|
| 524 |
|
| 525 |
return eval_set_full
|
|
|
|
| 508 |
eval_set = []
|
| 509 |
for i, b in enumerate(sub_sequences):
|
| 510 |
ques_update = st.empty()
|
| 511 |
+
qa = chain.run(b)
|
| 512 |
+
eval_set.append(qa)
|
| 513 |
+
ques_update.info("Creating Question:",i+1)
|
| 514 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
| 515 |
eval_set_full = list(itertools.chain.from_iterable(eval_set))
|
| 516 |
|
| 517 |
update.empty()
|
|
|
|
| 518 |
ques_update.empty()
|
| 519 |
|
| 520 |
return eval_set_full
|