Spaces:
Sleeping
Sleeping
Commit
·
6a21780
1
Parent(s):
fcd14e1
Add system
Browse files- system/pledge_tracking.py +17 -2
- test.html +6 -5
system/pledge_tracking.py
CHANGED
|
@@ -85,7 +85,12 @@ def run_pipeline(claim, pledge_date, pledge_author, start_date, timestamp, user_
|
|
| 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"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 89 |
step_id+=1
|
| 90 |
|
| 91 |
else:
|
|
@@ -99,7 +104,17 @@ def run_pipeline(claim, pledge_date, pledge_author, start_date, timestamp, user_
|
|
| 99 |
repo_type="dataset",
|
| 100 |
token=os.environ["HF_TOKEN"]
|
| 101 |
)
|
| 102 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 103 |
|
| 104 |
|
| 105 |
augmented_tsv_file = run_augmented_searching(
|
|
|
|
| 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"
|
| 89 |
+
f"{questions[0]}\n"
|
| 90 |
+
f"{questions[1]}\n"
|
| 91 |
+
f"{questions[2]}\n"
|
| 92 |
+
f"{questions[3]}\n"
|
| 93 |
+
f"{questions[4]}\n")
|
| 94 |
step_id+=1
|
| 95 |
|
| 96 |
else:
|
|
|
|
| 104 |
repo_type="dataset",
|
| 105 |
token=os.environ["HF_TOKEN"]
|
| 106 |
)
|
| 107 |
+
with open(qa_file_path, "r", encoding="utf-8") as f:
|
| 108 |
+
questions = {line["question"] for line in json.load(f)["evidence"]}
|
| 109 |
+
line_count = len(questions)
|
| 110 |
+
if update_fn:
|
| 111 |
+
update_fn(step_id, f"relevant queries are generated, for example:\n"
|
| 112 |
+
f"{questions[0]}\n"
|
| 113 |
+
f"{questions[1]}\n"
|
| 114 |
+
f"{questions[2]}\n"
|
| 115 |
+
f"{questions[3]}\n"
|
| 116 |
+
f"{questions[4]}\n")
|
| 117 |
+
step_id+=1
|
| 118 |
|
| 119 |
|
| 120 |
augmented_tsv_file = run_augmented_searching(
|
test.html
CHANGED
|
@@ -159,11 +159,12 @@
|
|
| 159 |
};
|
| 160 |
|
| 161 |
const stepListSuggestion = {
|
| 162 |
-
1: "
|
| 163 |
-
2: "
|
| 164 |
-
3: "
|
| 165 |
-
4: "
|
| 166 |
-
5: "
|
|
|
|
| 167 |
};
|
| 168 |
|
| 169 |
let stepList = stepListStandard;
|
|
|
|
| 159 |
};
|
| 160 |
|
| 161 |
const stepListSuggestion = {
|
| 162 |
+
1: "Generating queries to retrieve evidence",
|
| 163 |
+
2: "Searching more articles",
|
| 164 |
+
3: "Scraping documents from URLs",
|
| 165 |
+
4: "Finding the most relevant documents",
|
| 166 |
+
5: "Extracting events from top documents",
|
| 167 |
+
6: "Sorting events temporally"
|
| 168 |
};
|
| 169 |
|
| 170 |
let stepList = stepListStandard;
|