Spaces:
Sleeping
Sleeping
File size: 1,024 Bytes
14c7fcf | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | """Small local smoke test that does not download neural models."""
from pathlib import Path
import sys
sys.path.insert(0, str(Path(__file__).resolve().parents[1]))
from src.narration import prepare_narration
from src.sections import split_markdown_sections
from src.sources import normalize_arxiv_reference
from src.summarization import extractive_summary
sample = """
# Abstract
We introduce a document-understanding system for scientific papers. The system preserves formulas and structure.
# Method
A multimodal transformer converts document-page images into structured tokens. A sequence-to-sequence transformer then summarizes selected sections.
# Conclusion
The combined pipeline produces text suitable for a neural text-to-speech model.
"""
sections = split_markdown_sections(sample)
summary = extractive_summary(sections, "overview")
narration = prepare_narration(summary, "overview")
assert normalize_arxiv_reference("2501.17887")
assert sections
assert summary
assert narration
print("Smoke test passed.")
|