Spaces:
Sleeping
Sleeping
Commit
·
a87af2b
1
Parent(s):
25f652b
Add system
Browse files- .DS_Store +0 -0
- system/augmented_searching.py +1 -0
- system/pledge_tracking.py +10 -10
- test.html +2 -1
.DS_Store
CHANGED
Binary files a/.DS_Store and b/.DS_Store differ
|
|
system/augmented_searching.py
CHANGED
@@ -50,6 +50,7 @@ def run_augmented_searching(qa_file, pipeline_base_dir, suggestion_meta, pledge_
|
|
50 |
qa_lines = open(f"{qa_file}","r").read()
|
51 |
qa_lines = json.loads(qa_lines)
|
52 |
claim_text = f"{pledge_author}: {qa_lines['claim']}"
|
|
|
53 |
else:
|
54 |
# claim_text = suggestion_meta["text"]
|
55 |
idx = suggestion_meta["index"]
|
|
|
50 |
qa_lines = open(f"{qa_file}","r").read()
|
51 |
qa_lines = json.loads(qa_lines)
|
52 |
claim_text = f"{pledge_author}: {qa_lines['claim']}"
|
53 |
+
idx=0
|
54 |
else:
|
55 |
# claim_text = suggestion_meta["text"]
|
56 |
idx = suggestion_meta["index"]
|
system/pledge_tracking.py
CHANGED
@@ -87,11 +87,11 @@ def run_pipeline(claim, pledge_date, pledge_author, start_date, timestamp, user_
|
|
87 |
line_count = len(questions)
|
88 |
if update_fn:
|
89 |
update_fn(step_id, f"{line_count} relevant queries are generated, for example:\n"
|
90 |
-
f"{questions[0]}\n"
|
91 |
-
f"{questions[1]}\n"
|
92 |
-
f"{questions[2]}\n"
|
93 |
-
f"{questions[3]}\n"
|
94 |
-
f"{questions[4]}")
|
95 |
step_id+=1
|
96 |
|
97 |
else:
|
@@ -112,11 +112,11 @@ def run_pipeline(claim, pledge_date, pledge_author, start_date, timestamp, user_
|
|
112 |
line_count = len(questions)
|
113 |
if update_fn:
|
114 |
update_fn(step_id, f"relevant queries are generated, for example:\n"
|
115 |
-
f"{questions[0]}\n"
|
116 |
-
f"{questions[1]}\n"
|
117 |
-
f"{questions[2]}\n"
|
118 |
-
f"{questions[3]}\n"
|
119 |
-
f"{questions[4]}")
|
120 |
step_id+=1
|
121 |
|
122 |
|
|
|
87 |
line_count = len(questions)
|
88 |
if update_fn:
|
89 |
update_fn(step_id, f"{line_count} relevant queries are generated, for example:\n"
|
90 |
+
f"1. {questions[0]}\n"
|
91 |
+
f"2. {questions[1]}\n"
|
92 |
+
f"3. {questions[2]}\n"
|
93 |
+
f"4. {questions[3]}\n"
|
94 |
+
f"5. {questions[4]}")
|
95 |
step_id+=1
|
96 |
|
97 |
else:
|
|
|
112 |
line_count = len(questions)
|
113 |
if update_fn:
|
114 |
update_fn(step_id, f"relevant queries are generated, for example:\n"
|
115 |
+
f"1. {questions[0]}\n"
|
116 |
+
f"2. {questions[1]}\n"
|
117 |
+
f"3. {questions[2]}\n"
|
118 |
+
f"4. {questions[3]}\n"
|
119 |
+
f"5. {questions[4]}")
|
120 |
step_id+=1
|
121 |
|
122 |
|
test.html
CHANGED
@@ -172,7 +172,8 @@
|
|
172 |
function renderStatus(statusDict) {
|
173 |
let html = "<ul class='list-disc ml-6 space-y-1 text-sm'>";
|
174 |
for (let step in stepList) {
|
175 |
-
const
|
|
|
176 |
const prefix = statusDict?.[step] ? "✅" : "⏳";
|
177 |
html += `<li>${prefix} Step ${step}: ${content}</li>`;
|
178 |
}
|
|
|
172 |
function renderStatus(statusDict) {
|
173 |
let html = "<ul class='list-disc ml-6 space-y-1 text-sm'>";
|
174 |
for (let step in stepList) {
|
175 |
+
const raw = statusDict?.[step] || stepList[step];
|
176 |
+
const content = raw.replace(/\n/g, "<br>");
|
177 |
const prefix = statusDict?.[step] ? "✅" : "⏳";
|
178 |
html += `<li>${prefix} Step ${step}: ${content}</li>`;
|
179 |
}
|