Download frontend/src/components/ExtractionList.tsx from Smart-Slate/Systematic-tool-review: direct link, hf CLI and curl.
- Browser
- Download file 1.4 kB
-
https://huggingface.co/spaces/Smart-Slate/Systematic-tool-review/resolve/main/frontend/src/components/ExtractionList.tsx
- Command line
-
hf download hf://spaces/Smart-Slate/Systematic-tool-review/frontend/src/components/ExtractionList.tsx
-
curl -L -o ExtractionList.tsx https://huggingface.co/spaces/Smart-Slate/Systematic-tool-review/resolve/main/frontend/src/components/ExtractionList.tsx
1.4 kB
| import type { ReactNode } from "react"; | |
| import type { ExtractionRecordEntry } from "../types"; | |
| import { latestExtractionsByOutcome } from "../utils/confidence"; | |
| const KLIMISCH_LABELS: Record<number, string> = { | |
| 1: "1 β reliable without restriction", | |
| 2: "2 β reliable with restrictions", | |
| 3: "3 β not reliable", | |
| 4: "4 β not assignable", | |
| }; | |
| export function ExtractionList({ records, onAddAnother, extra }: { | |
| records: ExtractionRecordEntry[]; | |
| onAddAnother: () => void; | |
| extra?: ReactNode; | |
| }) { | |
| return ( | |
| <div className="extraction-summary"> | |
| {latestExtractionsByOutcome(records).map((r) => ( | |
| <div key={r.id}> | |
| <strong>Extracted</strong> by {r.extracted_by} | |
| {r.outcome ? ` β ${r.outcome}` : ""} | |
| {r.evidence_stream ? ` (${r.evidence_stream.replace("_", " ")})` : ""}:{" "} | |
| {[r.species, r.route, r.duration, r.effect_finding].filter(Boolean).join(" Β· ")} | |
| {r.klimisch_score != null && ( | |
| <div className="klimisch-line"> | |
| <strong>Klimisch:</strong> {KLIMISCH_LABELS[r.klimisch_score] ?? r.klimisch_score} | |
| {r.klimisch_justification ? ` β ${r.klimisch_justification}` : ""} | |
| </div> | |
| )} | |
| </div> | |
| ))} | |
| <button className="change-btn" onClick={onAddAnother}> | |
| Add data for another outcome | |
| </button>{" "} | |
| {extra} | |
| </div> | |
| ); | |
| } |