Spaces:
Build error
Build error
Commit
·
9d6c6a0
1
Parent(s):
fc4b043
fail safe
Browse files
app.py
CHANGED
|
@@ -106,15 +106,7 @@ def run(claim):
|
|
| 106 |
try:
|
| 107 |
js = loren.check(claim)
|
| 108 |
except:
|
| 109 |
-
|
| 110 |
-
'id': 0,
|
| 111 |
-
'evidence': ['EVIDENCE1', 'EVIDENCE2'],
|
| 112 |
-
'question': ['QUESTION1', 'QUESTION2'],
|
| 113 |
-
'claim_phrases': ['CLAIMPHRASE1', 'CLAIMPHRASE2'],
|
| 114 |
-
'local_premises': [['E1 ' * 100, 'E1 ' * 100, 'E1 ' * 10], ['E2', 'E2', 'E2']],
|
| 115 |
-
'phrase_veracity': [[0.1, 0.5, 0.4], [0.1, 0.7, 0.2]],
|
| 116 |
-
'claim_veracity': 'Oops! Something went wrong.'
|
| 117 |
-
}
|
| 118 |
loren.logger.warning(str(js))
|
| 119 |
ev_html = gradio_formatter(js, 'e')
|
| 120 |
z_html = gradio_formatter(js, 'z')
|
|
@@ -134,8 +126,8 @@ iface = gr.Interface(
|
|
| 134 |
'The Cry of the Owl is based on a book by an American.',
|
| 135 |
'Smriti Mandhana is an Indian woman.'],
|
| 136 |
title="LOREN",
|
| 137 |
-
layout='
|
| 138 |
-
description="LOREN is an interpretable Fact Verification model
|
| 139 |
"This is a demo system for the AAAI 2022 paper: \"LOREN: Logic-Regularized Reasoning for Interpretable Fact Verification\"(https://arxiv.org/abs/2012.13577). "
|
| 140 |
"See the paper for technical details. You can add a *FLAG* on the bottom to record interesting or bad cases! "
|
| 141 |
"(Note that the demo system directly retrieves evidence from an up-to-date Wikipedia, which is different from the evidence used in the paper.)",
|
|
|
|
| 106 |
try:
|
| 107 |
js = loren.check(claim)
|
| 108 |
except:
|
| 109 |
+
return 'Oops, something went wrong.', '', ''
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 110 |
loren.logger.warning(str(js))
|
| 111 |
ev_html = gradio_formatter(js, 'e')
|
| 112 |
z_html = gradio_formatter(js, 'z')
|
|
|
|
| 126 |
'The Cry of the Owl is based on a book by an American.',
|
| 127 |
'Smriti Mandhana is an Indian woman.'],
|
| 128 |
title="LOREN",
|
| 129 |
+
layout='horizontal',
|
| 130 |
+
description="LOREN is an interpretable Fact Verification model using Wikipedia as its knowledge source. "
|
| 131 |
"This is a demo system for the AAAI 2022 paper: \"LOREN: Logic-Regularized Reasoning for Interpretable Fact Verification\"(https://arxiv.org/abs/2012.13577). "
|
| 132 |
"See the paper for technical details. You can add a *FLAG* on the bottom to record interesting or bad cases! "
|
| 133 |
"(Note that the demo system directly retrieves evidence from an up-to-date Wikipedia, which is different from the evidence used in the paper.)",
|