Spaces:
Running
Running
Download templates/index.html from google/radextract: direct link, hf CLI and curl.
- Browser
- Download file 21.9 kB
-
https://huggingface.co/spaces/google/radextract/resolve/main/templates/index.html
- Command line
-
hf download hf://spaces/google/radextract/templates/index.html
-
curl -L -o index.html https://huggingface.co/spaces/google/radextract/resolve/main/templates/index.html
21.9 kB
| <html> | |
| <head> | |
| <title>Radiology Report Structuring</title> | |
| <meta name="viewport" content="width=device-width, initial-scale=1" /> | |
| <!-- Open Graph / Twitter Card meta tags for rich link previews --> | |
| <meta | |
| property="og:title" | |
| content="RadExtract – Radiology Report Structuring Demo" | |
| /> | |
| <meta | |
| property="og:description" | |
| content="Transform unstructured radiology reports into actionable, structured data instantly. See how Google's Gemini AI + LangExtract revolutionize medical documentation with real-time extraction of findings, impressions, and clinical insights." | |
| /> | |
| <meta property="og:url" content="{{ share_url_for_sharing }}" /> | |
| <meta | |
| property="og:image" | |
| content="{{ share_url_for_sharing }}/static/radextract-preview.jpg" | |
| /> | |
| <meta property="og:type" content="website" /> | |
| <meta | |
| property="og:video" | |
| content="{{ share_url_for_sharing }}/static/radextract-preview.mp4" | |
| /> | |
| <meta | |
| property="og:video:secure_url" | |
| content="{{ share_url_for_sharing }}/static/radextract-preview.mp4" | |
| /> | |
| <meta property="og:video:type" content="video/mp4" /> | |
| <meta property="og:video:width" content="1920" /> | |
| <meta property="og:video:height" content="1080" /> | |
| <meta name="twitter:card" content="player" /> | |
| <meta | |
| name="twitter:title" | |
| content="RadExtract – Radiology Report Structuring Demo" | |
| /> | |
| <meta | |
| name="twitter:description" | |
| content="Transform unstructured radiology reports into actionable, structured data instantly. See how Google's Gemini AI + LangExtract revolutionize medical documentation with real-time extraction of findings, impressions, and clinical insights." | |
| /> | |
| <meta | |
| name="twitter:image" | |
| content="{{ share_url_for_sharing }}/static/radextract-preview.jpg" | |
| /> | |
| <meta | |
| name="twitter:player" | |
| content="{{ share_url_for_sharing }}/static/radextract-preview.mp4" | |
| /> | |
| <meta name="twitter:player:width" content="1920" /> | |
| <meta name="twitter:player:height" content="1080" /> | |
| <meta | |
| name="twitter:player:stream" | |
| content="{{ share_url_for_sharing }}/static/radextract-preview.mp4" | |
| /> | |
| <meta name="twitter:player:stream:content_type" content="video/mp4" /> | |
| <link rel="icon" type="image/svg+xml" href="/static/favicon.svg" /> | |
| <link rel="shortcut icon" href="/static/favicon.svg" /> | |
| <link rel="apple-touch-icon" href="/static/favicon.svg" /> | |
| <link rel="stylesheet" href="/static/style.css?v=20260721-studio" /> | |
| <link rel="preconnect" href="https://fonts.googleapis.com" /> | |
| <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin /> | |
| <link | |
| href="https://fonts.googleapis.com/css2?family=Google+Sans:wght@400;500;700&family=Google+Sans+Text:wght@400;500&display=swap" | |
| rel="stylesheet" | |
| /> | |
| <link | |
| href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:wght@300;400;500" | |
| rel="stylesheet" | |
| /> | |
| <link | |
| rel="stylesheet" | |
| href="https://cdn.jsdelivr.net/npm/json-formatter-js@2.3.4/dist/json-formatter.min.css" | |
| /> | |
| </head> | |
| <body class="page-wrapper"> | |
| <header class="header-container studio-hero"> | |
| <div class="hero-copy"> | |
| <p class="hero-eyebrow">Grounded radiology extraction</p> | |
| <h1><strong>RadExtract</strong></h1> | |
| <p class="hero-description"> | |
| Turn a free-text radiology report into structured findings, with every | |
| extraction linked to its exact source words. | |
| </p> | |
| </div> | |
| <div class="hero-attribution" aria-label="Technology attribution"> | |
| <span>Powered by LangExtract + Gemini Flash</span> | |
| <img | |
| src="/static/google-research-logo.svg" | |
| alt="Google Research" | |
| width="174" | |
| height="25" | |
| /> | |
| <div class="hero-links"> | |
| <a | |
| href="https://github.com/google/langextract" | |
| target="_blank" | |
| rel="noopener noreferrer" | |
| >LangExtract on GitHub | |
| <span class="material-symbols-outlined" aria-hidden="true" | |
| >open_in_new</span | |
| ></a | |
| > | |
| <a | |
| href="https://developers.googleblog.com/en/introducing-langextract-a-gemini-powered-information-extraction-library" | |
| target="_blank" | |
| rel="noopener noreferrer" | |
| >LangExtract release blog | |
| <span class="material-symbols-outlined" aria-hidden="true" | |
| >open_in_new</span | |
| ></a | |
| > | |
| </div> | |
| </div> | |
| <div class="safety-strip" role="note"> | |
| <span class="material-symbols-outlined" aria-hidden="true" | |
| >warning</span | |
| > | |
| <span | |
| ><strong>Research demonstration — not for clinical use.</strong> | |
| RadExtract does not diagnose, recommend treatment, or provide medical | |
| advice.</span | |
| > | |
| </div> | |
| </header> | |
| <section class="samples-container card" aria-labelledby="sample-heading"> | |
| <div class="sample-heading-row"> | |
| <div> | |
| <p class="section-kicker">Start with a study</p> | |
| <h2 id="sample-heading">Explore sample reports</h2> | |
| </div> | |
| <p>Choose a study. Built-in examples can use saved or live results.</p> | |
| </div> | |
| <div class="sample-rail-shell"> | |
| <div class="sample-buttons" aria-label="Sample radiology reports"></div> | |
| </div> | |
| <p class="samples-tip tip-desktop"> | |
| Select a finding to trace it to the source. Edit the report and choose | |
| <strong>Process</strong> to run a live extraction. | |
| </p> | |
| <p class="mobile-tip" role="note"> | |
| Tap a finding to reveal its grounded source excerpt. Custom report input | |
| remains available on desktop and laptop computers. | |
| </p> | |
| </section> | |
| <main | |
| id="transformation-studio" | |
| class="text-area-container card transformation-studio" | |
| aria-labelledby="studio-heading" | |
| > | |
| <div class="studio-heading"> | |
| <div> | |
| <p class="section-kicker">Source → structure</p> | |
| <h2 id="studio-heading">Transformation Studio</h2> | |
| <p>Focus a structured item to illuminate its exact source span.</p> | |
| </div> | |
| <div class="studio-state" id="studio-state" aria-live="polite"> | |
| Choose a sample or enter a report | |
| </div> | |
| </div> | |
| <div id="studio-metrics" class="studio-metrics" aria-live="polite"> | |
| <div class="metric"> | |
| <span id="metric-items">—</span><small>Extracted items</small> | |
| </div> | |
| <div class="metric"> | |
| <span id="metric-grounded">—</span><small>Source-grounded</small> | |
| </div> | |
| <div class="metric"> | |
| <span id="metric-significant">—</span><small>Significant</small> | |
| </div> | |
| <div class="metric"> | |
| <span id="metric-minor">—</span><small>Minor</small> | |
| </div> | |
| </div> | |
| <div class="text-area-wrapper input-wrapper"> | |
| <div class="input-header"> | |
| <div> | |
| <span class="panel-number">01</span> | |
| <h2>Source report</h2> | |
| </div> | |
| <label class="prompt-toggle" | |
| ><input type="checkbox" id="prompt-toggle" /> LX Prompt</label | |
| > | |
| </div> | |
| <div id="input-text-container" class="input-container"> | |
| <textarea | |
| id="input-text" | |
| class="large-text-area" | |
| placeholder="Enter radiology report here or load a sample from above..." | |
| spellcheck="false" | |
| autocomplete="off" | |
| autocorrect="off" | |
| autocapitalize="off" | |
| inputmode="none" | |
| ></textarea> | |
| <button | |
| id="clear-input" | |
| class="clear-button-overlay" | |
| title="Clear input" | |
| > | |
| <svg | |
| width="20" | |
| height="20" | |
| viewBox="0 0 24 24" | |
| fill="none" | |
| stroke="currentColor" | |
| stroke-width="2" | |
| > | |
| <line x1="18" y1="6" x2="6" y2="18"></line> | |
| <line x1="6" y1="6" x2="18" y2="18"></line> | |
| </svg> | |
| </button> | |
| </div> | |
| <div id="prompt-output" class="raw-json" style="display: none"></div> | |
| </div> | |
| <div class="text-area-wrapper output-wrapper" id="output-container"> | |
| <div class="output-header"> | |
| <div> | |
| <span class="panel-number">02</span> | |
| <h2>Structured extraction</h2> | |
| </div> | |
| <div class="output-view-tabs" role="tablist" aria-label="Output view"> | |
| <button | |
| class="output-view-tab" | |
| id="report-tab" | |
| data-output-view="report" | |
| role="tab" | |
| aria-selected="false" | |
| aria-controls="output-text" | |
| aria-disabled="true" | |
| disabled | |
| > | |
| Report | |
| </button> | |
| <button | |
| class="output-view-tab active" | |
| id="findings-tab" | |
| data-output-view="cards" | |
| role="tab" | |
| aria-selected="true" | |
| aria-controls="findings-cards" | |
| > | |
| Findings | |
| </button> | |
| <button | |
| class="output-view-tab" | |
| id="raw-tab" | |
| data-output-view="raw" | |
| role="tab" | |
| aria-selected="false" | |
| aria-controls="raw-output" | |
| aria-disabled="true" | |
| disabled | |
| > | |
| LX Data | |
| </button> | |
| </div> | |
| <label class="raw-toggle visually-hidden" aria-hidden="true" | |
| ><input type="checkbox" id="raw-toggle" tabindex="-1" /> LX | |
| Data</label | |
| > | |
| </div> | |
| <div id="output-text-container" class="output-container"> | |
| <div | |
| id="findings-cards" | |
| class="findings-cards" | |
| role="tabpanel" | |
| aria-labelledby="findings-tab" | |
| aria-hidden="false" | |
| aria-live="polite" | |
| > | |
| <div class="cards-placeholder"> | |
| <span class="material-symbols-outlined" aria-hidden="true" | |
| >auto_awesome</span | |
| > | |
| <p>Select a sample to begin exploring grounded findings.</p> | |
| </div> | |
| </div> | |
| <pre | |
| id="output-text" | |
| class="large-text-area output-text" | |
| role="tabpanel" | |
| aria-labelledby="report-tab" | |
| aria-hidden="true" | |
| style="display: none" | |
| placeholder="Structured output will appear here..." | |
| ></pre> | |
| <div | |
| id="raw-output" | |
| class="raw-json output-text" | |
| role="tabpanel" | |
| aria-labelledby="raw-tab" | |
| aria-hidden="true" | |
| style="display: none" | |
| ></div> | |
| <button | |
| id="copy-output" | |
| class="copy-button-overlay" | |
| title="Copy output to clipboard" | |
| > | |
| <svg | |
| width="20" | |
| height="20" | |
| viewBox="0 0 24 24" | |
| fill="none" | |
| stroke="currentColor" | |
| stroke-width="2" | |
| > | |
| <rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect> | |
| <path | |
| d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" | |
| ></path> | |
| </svg> | |
| </button> | |
| <div | |
| id="loading-overlay" | |
| class="loading-overlay" | |
| style="display: none" | |
| > | |
| <div class="spinner"></div> | |
| <div class="loader-text"> | |
| <span class="loader-message" | |
| >Running LangExtract with Gemini Flash (latest)</span | |
| > | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="panel-controls"> | |
| <!-- ROW 1 --> | |
| <div class="model-select-container"> | |
| <label for="model-select">Model:</label> | |
| <select id="model-select"> | |
| <option value="gemini-flash-latest" selected> | |
| Gemini Flash (latest) | |
| </option> | |
| </select> | |
| </div> | |
| <label class="cache-toggle"> | |
| <input type="checkbox" id="cache-toggle" checked /> | |
| Use Cache | |
| <span class="cache-status" id="cache-status"></span> | |
| </label> | |
| <!-- ROW 2 (mobile only) --> | |
| <label class="prompt-toggle mobile-toggle"> | |
| <input type="checkbox" id="prompt-toggle-mobile" /> LX Prompt | |
| </label> | |
| <label class="raw-toggle mobile-toggle"> | |
| <input type="checkbox" id="raw-toggle-mobile" /> LX Data | |
| </label> | |
| </div> | |
| </main> | |
| <div class="action-bar"> | |
| <button id="predict-button">Process</button> | |
| <div class="clinical-significance-legend"> | |
| <span class="legend-title">Findings:</span> | |
| <span class="legend-item" | |
| ><span class="legend-line minor"></span>General</span | |
| > | |
| <span class="legend-item" | |
| ><span class="legend-line major"></span>Significant</span | |
| > | |
| <span class="legend-item" | |
| ><span class="legend-line grounding"></span>Grounding</span | |
| > | |
| </div> | |
| </div> | |
| <div class="instructions"></div> | |
| <section | |
| id="how-it-works" | |
| class="supporting-details" | |
| aria-labelledby="details-heading" | |
| > | |
| <div class="supporting-heading"> | |
| <p class="section-kicker">Go deeper</p> | |
| <h2 id="details-heading">How RadExtract works</h2> | |
| </div> | |
| <div class="supporting-grid"> | |
| <article class="support-card"> | |
| <span | |
| class="material-symbols-outlined support-icon" | |
| aria-hidden="true" | |
| >link</span | |
| > | |
| <h3>Grounded by LangExtract</h3> | |
| <p> | |
| <a | |
| class="banner-link" | |
| href="https://github.com/google/langextract" | |
| target="_blank" | |
| rel="noopener noreferrer" | |
| >LangExtract</a | |
| > | |
| converts free text into schema-controlled data learned from a | |
| task-specific | |
| <a | |
| class="banner-link" | |
| href="https://huggingface.co/spaces/google/radextract/blob/main/prompt_instruction.py" | |
| target="_blank" | |
| rel="noopener noreferrer" | |
| >prompt</a | |
| > | |
| and | |
| <a | |
| class="banner-link" | |
| href="https://huggingface.co/spaces/google/radextract/blob/main/report_examples.py" | |
| target="_blank" | |
| rel="noopener noreferrer" | |
| >few-shot examples</a | |
| >. Each extracted item retains a direct link to its source words. | |
| </p> | |
| </article> | |
| <article class="support-card"> | |
| <span | |
| class="material-symbols-outlined support-icon" | |
| aria-hidden="true" | |
| >view_in_ar</span | |
| > | |
| <h3>Explore every layer</h3> | |
| <p> | |
| Switch between scan-friendly findings, the complete formatted | |
| report, raw LangExtract data, and the generated prompt. General and | |
| significant findings use distinct visual markers without implying a | |
| diagnostic confidence score. | |
| </p> | |
| </article> | |
| <article class="support-card"> | |
| <span | |
| class="material-symbols-outlined support-icon" | |
| aria-hidden="true" | |
| >clinical_notes</span | |
| > | |
| <h3>Clinical background</h3> | |
| <p> | |
| Structured reporting can improve completeness, reduce ambiguity, and | |
| facilitate data sharing. Read the | |
| <a | |
| class="banner-link" | |
| href="https://link.springer.com/article/10.1007/s13244-017-0588-8" | |
| target="_blank" | |
| rel="noopener noreferrer" | |
| >European Society of Radiology background paper</a | |
| >. | |
| </p> | |
| </article> | |
| </div> | |
| </section> | |
| <div class="interface-options-panel card"> | |
| <div class="interface-options-header" data-action="toggle-interface"> | |
| <h4 class="interface-options-title">Under the hood</h4> | |
| <div class="interface-options-summary"> | |
| <span | |
| >LX Generated Prompt • LX Structured Output • Cache controls</span | |
| > | |
| <span | |
| class="material-symbols-outlined expand-icon" | |
| id="interface-expand-icon" | |
| >expand_more</span | |
| > | |
| </div> | |
| </div> | |
| <div | |
| class="interface-options-content" | |
| id="interface-options-content" | |
| style="display: none" | |
| > | |
| <div class="interface-options-grid"> | |
| <div class="interface-option"> | |
| <div class="option-header"> | |
| <span class="material-symbols-outlined option-icon" | |
| >visibility</span | |
| > | |
| <strong>LX Generated Prompt</strong> | |
| </div> | |
| <p class="option-description"> | |
| Inspect the task description, examples, and input sent to the | |
| model. | |
| </p> | |
| </div> | |
| <div class="interface-option"> | |
| <div class="option-header"> | |
| <span class="material-symbols-outlined option-icon">code</span> | |
| <strong>LX Structured Output</strong> | |
| </div> | |
| <p class="option-description"> | |
| Inspect the raw extraction data and its grounding intervals. | |
| </p> | |
| </div> | |
| <div class="interface-option"> | |
| <div class="option-header"> | |
| <span class="material-symbols-outlined option-icon">cached</span> | |
| <strong>Use Cache</strong> | |
| </div> | |
| <p class="option-description"> | |
| Built-in samples use pre-generated results; edited reports use | |
| live inference. | |
| </p> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <section class="full-disclaimer card" aria-labelledby="safety-heading"> | |
| <span class="material-symbols-outlined disclaimer-icon" aria-hidden="true" | |
| >health_and_safety</span | |
| > | |
| <div> | |
| <h2 id="safety-heading">Safety, license, and citation</h2> | |
| <p> | |
| This demonstration is for illustrative purposes only to show the | |
| baseline capabilities of LangExtract. It does not represent a finished | |
| or approved product, is not intended to diagnose or suggest treatment | |
| for any disease or condition, and should not be used for medical | |
| advice. | |
| </p> | |
| <p> | |
| If you use RadExtract or LangExtract in production or publications, | |
| please cite accordingly and acknowledge usage. Use is subject to the | |
| Apache 2.0 License. See the | |
| <a | |
| class="banner-link" | |
| href="https://huggingface.co/spaces/google/radextract/blob/main/README.md#disclaimer" | |
| target="_blank" | |
| rel="noopener noreferrer" | |
| >README for details</a | |
| >. | |
| </p> | |
| </div> | |
| </section> | |
| <script src="https://cdn.jsdelivr.net/npm/json-formatter-js@2.3.4/dist/json-formatter.umd.js"></script> | |
| <script src="https://cdn.jsdelivr.net/npm/marked@9.1.6/marked.min.js"></script> | |
| <script | |
| src="https://cdn.jsdelivr.net/npm/dompurify@3.4.12/dist/purify.min.js" | |
| integrity="sha384-piCcpDdJ7qVeK4Tv8Z6Hpcr3ZBIgP16TxQTPVfsLFdZ5uDgwc3Y8Ho7oUnqf12qu" | |
| crossorigin="anonymous" | |
| ></script> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.12.2/gsap.min.js"></script> | |
| <script type="module" src="/static/script.js?v=20260721-studio"></script> | |
| <!-- Bottom share placement (minimal space above footer) --> | |
| <div class="share-bottom"> | |
| <span>Share this demo →</span> | |
| <a | |
| class="shr-btn shr-x" | |
| href="https://twitter.com/intent/tweet?text={{ share_text }}" | |
| target="_blank" | |
| rel="noopener" | |
| aria-label="Share on X" | |
| > | |
| <svg viewBox="0 0 24 24" width="24" aria-hidden="true"> | |
| <path | |
| fill="currentColor" | |
| d="M23 2.999a9.05 9.05 0 0 1-2.588.71A4.516 4.516 0 0 0 22.36.365a9.04 9.04 0 0 1-2.867 1.096 4.505 4.505 0 0 0-7.67 4.107A12.79 12.79 0 0 1 1.64.896a4.505 4.505 0 0 0 1.396 6.01 4.47 4.47 0 0 1-2.04-.563v.057a4.507 4.507 0 0 0 3.614 4.417 4.522 4.522 0 0 1-2.034.077 4.508 4.508 0 0 0 4.207 3.128A9.03 9.03 0 0 1 0 19.54a12.75 12.75 0 0 0 6.92 2.026c8.304 0 12.846-6.877 12.846-12.837 0-.196-.004-.392-.013-.586A9.17 9.17 0 0 0 23 2.999z" | |
| /> | |
| </svg> | |
| </a> | |
| <a | |
| class="shr-btn shr-li" | |
| href="https://www.linkedin.com/shareArticle?mini=true&url={{ share_url_encoded }}&title={{ linkedin_title }}&summary={{ linkedin_summary }}&source=RadExtract" | |
| target="_blank" | |
| rel="noopener" | |
| aria-label="Share on LinkedIn" | |
| > | |
| <svg viewBox="0 0 24 24" width="24" aria-hidden="true"> | |
| <path | |
| fill="currentColor" | |
| d="M4.98 3.5C4.98 5.43 3.43 7 1.5 7S-1.98 5.43-1.98 3.5 0.57 0 2.5 0 4.98 1.57 4.98 3.5zM.02 8h5V24h-5V8zM7.98 8h4.8v2.2h.07c.67-1.27 2.31-2.6 4.76-2.6 5.09 0 6.04 3.35 6.04 7.7V24h-5v-7.7c0-1.84-.03-4.21-2.57-4.21-2.57 0-2.96 1.99-2.96 4.07V24h-5V8z" | |
| /> | |
| </svg> | |
| </a> | |
| </div> | |
| <div class="footer-note"> | |
| View this demo’s source on <a | |
| class="banner-link" | |
| href="https://huggingface.co/spaces/google/radextract/tree/main" | |
| target="_blank" | |
| rel="noopener noreferrer" | |
| >Hugging Face Spaces</a | |
| > 🤗 | |
| </div> | |
| </body> | |
| </html> | |