Spaces:
Build error
Build error
jiangjiechen
commited on
Commit
•
fc4b043
1
Parent(s):
35e858b
bug control
Browse files
app.py
CHANGED
@@ -103,16 +103,18 @@ def gradio_formatter(js, output_type):
|
|
103 |
|
104 |
|
105 |
def run(claim):
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
|
|
|
|
116 |
loren.logger.warning(str(js))
|
117 |
ev_html = gradio_formatter(js, 'e')
|
118 |
z_html = gradio_formatter(js, 'z')
|
|
|
103 |
|
104 |
|
105 |
def run(claim):
|
106 |
+
try:
|
107 |
+
js = loren.check(claim)
|
108 |
+
except:
|
109 |
+
js = {
|
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')
|