git clone https://github.com/YOUR_USERNAME/Research2Text.git
cd Research2Text-mainpython -m venv venv
.\venv\Scripts\activatepython -m venv venv
venv\Scripts\activate.batpython3 -m venv venv
source venv/bin/activateYou should see
(venv)at the start of your terminal prompt.
pip install --upgrade pip
pip install -r requirements.txtThis single command installs everything for Phases 1–5: PyMuPDF, ChromaDB, Streamlit, PyTorch, Tesseract bindings, Ollama, SymPy, NetworkX, and all dev tools.
These are large packages and only needed if you want the premium extraction pipeline:
# MinerU — preserves LaTeX equations, tables, and reading order
pip install "mineru[all]"
# olmOCR — VLM-based fallback for scanned/complex PDFs
pip install "olmocr[gpu]"Without these, the pipeline auto-falls back to PyMuPDF (already installed).
If you want LLM-powered method extraction and code generation:
# Install a coder model (pick one)
ollama pull deepseek-coder-v2
ollama pull qwen2.5-coder
ollama pull codellama
# Verify it's running
ollama listThe pipeline auto-detects which model is available. If none are installed, it falls back to heuristic extraction.
mkdir -p data/raw_pdfs data/raw_texts outputsOn Windows CMD:
mkdir data\raw_pdfs data\raw_texts outputscd src
!```
Open **http://localhost:8501** in your browser.
### Option B: Run Tests
```bash
python tests/test_multiagent_pipeline.pyExpected output:
TEST 1 PASSED: All agents imported successfully.
TEST 2 PASSED: Orchestrator initialized with all 10 agents.
TEST 3 PASSED: All agents process mock data correctly.
TEST 4 PASSED: Full pipeline completed successfully.
🎉 ALL TESTS PASSED!
cd src
python paper_to_code_multiagent.py --pdf ../data/raw_pdfs/your_paper.pdf- Start the app →
streamlit run src/app_streamlit.py - Upload a PDF → Drag any research paper PDF into the upload area
- Click "Run Multi-Agent Pipeline" → Watch the 9-stage progress tracker
- Review results → Check confidence scores, generated code, knowledge graph
- Download artifacts → Click "Download Artifacts" for the ZIP bundle
| Problem | Fix |
|---|---|
ModuleNotFoundError |
Make sure venv is activated: .\venv\Scripts\activate |
chromadb errors |
pip install chromadb --upgrade |
| Empty PDF extraction | Install MinerU: pip install mineru[all] |
| No LLM answer | Install Ollama + pull a model: ollama pull codellama |
| Sandbox validation fails | Install PyTorch: pip install torch |
Research2Text-main/
├── src/
│ ├── app_streamlit.py ← Main UI (streamlit run this)
│ ├── agents/
│ │ ├── orchestrator.py ← 10-agent pipeline coordinator
│ │ ├── ingest_agent.py ← MinerU/olmOCR/PyMuPDF extraction
│ │ ├── vision_agent.py ← Image/table batch processing
│ │ ├── method_extractor_agent.py ← Conformal prediction + LLM
│ │ ├── validator_agent.py ← Sandbox execution + self-heal
│ │ └── ... ← 5 more specialized agents
│ ├── schemas.py ← Pydantic models + ConfidenceScore
│ ├── code_generator.py ← Confidence-aware code generation
│ └── ...
├── tests/
│ └── test_multiagent_pipeline.py
├── data/ ← PDFs and extracted text
├── outputs/ ← Generated code + pipeline results
├── requirements.txt
├── start.bat ← Windows launcher
└── STARTUP.md ← This file