Spaces:
Running
on
A100
Running
on
A100
Commit
·
25f652b
1
Parent(s):
da9a784
Add system
Browse files
system/pledge_tracking.py
CHANGED
@@ -83,6 +83,7 @@ def run_pipeline(claim, pledge_date, pledge_author, start_date, timestamp, user_
|
|
83 |
|
84 |
with open(qa_file_path, "r", encoding="utf-8") as f:
|
85 |
questions = {line["question"] for line in json.load(f)["evidence"]}
|
|
|
86 |
line_count = len(questions)
|
87 |
if update_fn:
|
88 |
update_fn(step_id, f"{line_count} relevant queries are generated, for example:\n"
|
@@ -107,6 +108,7 @@ def run_pipeline(claim, pledge_date, pledge_author, start_date, timestamp, user_
|
|
107 |
idx = suggestion_meta["index"]
|
108 |
qa_lines = open(f"{qa_file_path}","r").readlines()[idx]
|
109 |
questions = {line["question"] for line in json.loads(qa_lines)["evidence"]}
|
|
|
110 |
line_count = len(questions)
|
111 |
if update_fn:
|
112 |
update_fn(step_id, f"relevant queries are generated, for example:\n"
|
|
|
83 |
|
84 |
with open(qa_file_path, "r", encoding="utf-8") as f:
|
85 |
questions = {line["question"] for line in json.load(f)["evidence"]}
|
86 |
+
questions = list(questions)
|
87 |
line_count = len(questions)
|
88 |
if update_fn:
|
89 |
update_fn(step_id, f"{line_count} relevant queries are generated, for example:\n"
|
|
|
108 |
idx = suggestion_meta["index"]
|
109 |
qa_lines = open(f"{qa_file_path}","r").readlines()[idx]
|
110 |
questions = {line["question"] for line in json.loads(qa_lines)["evidence"]}
|
111 |
+
questions = list(questions)
|
112 |
line_count = len(questions)
|
113 |
if update_fn:
|
114 |
update_fn(step_id, f"relevant queries are generated, for example:\n"
|