Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -29,7 +29,7 @@ def call(model_name, sentence, detection_threshold):
|
|
29 |
def pretty_qas(pred_info) -> List[str]:
|
30 |
if not pred_info or not pred_info['QAs']: return []
|
31 |
return [f"{qa['question']} --- {';'.join(qa['answers'])}"
|
32 |
-
for qa in pred_info['QAs']]
|
33 |
all_qas = [qa for pred_info in pred_infos for qa in pretty_qas(pred_info)]
|
34 |
if not pred_infos:
|
35 |
pretty_qa_output = "NO NOMINALIZATION FOUND"
|
|
|
29 |
def pretty_qas(pred_info) -> List[str]:
|
30 |
if not pred_info or not pred_info['QAs']: return []
|
31 |
return [f"{qa['question']} --- {';'.join(qa['answers'])}"
|
32 |
+
for qa in pred_info['QAs'] if qa is not None]
|
33 |
all_qas = [qa for pred_info in pred_infos for qa in pretty_qas(pred_info)]
|
34 |
if not pred_infos:
|
35 |
pretty_qa_output = "NO NOMINALIZATION FOUND"
|