Spaces:
Sleeping
Sleeping
Upload compare_gradio.py
Browse files- compare_gradio.py +2 -4
compare_gradio.py
CHANGED
|
@@ -105,16 +105,14 @@ def fact_checking(article_topic, config):
|
|
| 105 |
def format_response(response):
|
| 106 |
title = response["metadata"]["title"]
|
| 107 |
main_claim = response["metadata"]["main_claim"]
|
| 108 |
-
|
| 109 |
fc = response["answer"]
|
| 110 |
-
|
| 111 |
rq = response["related_questions"]
|
| 112 |
|
| 113 |
rq_block = []
|
| 114 |
for q, a in rq.items():
|
| 115 |
-
rq_block.append(
|
| 116 |
|
| 117 |
-
return
|
| 118 |
|
| 119 |
|
| 120 |
def do_both_fact_checking(msg):
|
|
|
|
| 105 |
def format_response(response):
|
| 106 |
title = response["metadata"]["title"]
|
| 107 |
main_claim = response["metadata"]["main_claim"]
|
|
|
|
| 108 |
fc = response["answer"]
|
|
|
|
| 109 |
rq = response["related_questions"]
|
| 110 |
|
| 111 |
rq_block = []
|
| 112 |
for q, a in rq.items():
|
| 113 |
+
rq_block.append("**{}**\n{}".format(q, a))
|
| 114 |
|
| 115 |
+
return "## {}\n\n### {}\n\n{}\n\n{}".format(title, main_claim, fc, "\n".join(rq_block))
|
| 116 |
|
| 117 |
|
| 118 |
def do_both_fact_checking(msg):
|