Research Draft is a lightweight tool that generates high-quality research paper abstracts from uploaded PDFs. It runs entirely on your local machine using a small instruction-tuned language model served through
Ollama , with a clean
Gradio web interface.
Built as a B.Tech / Data Science final-year project.
┌─────────────┐ ┌──────────────┐ ┌────────────────┐ ┌───────────┐
│ Gradio UI │────▶│ abstract_ │────▶│ pdf_utils.py │ │ Ollama │
│ (app.py) │ │ service.py │ │ (extract/ │ │ Server │
│ │◀────│ │────▶│ clean PDF) │ │ (local) │
└─────────────┘ │ │────▶│ │ │ │
│ │ └────────────────┘ │ │
│ │────▶┌────────────────┐ │ │
│ │ │ llm_client.py │────▶│ /api/chat │
│ │◀────│ (Ollama API) │◀────│ │
│ │ └────────────────┘ └───────────┘
│ │────▶┌────────────────┐
│ │ │ history_ │
└──────────────┘ │ manager.py │
│ (JSON store) │
└────────────────┘
research-draft/
├── app.py # Gradio Blocks UI — entry point
├── pdf_utils.py # PDF text extraction and cleaning
├── llm_client.py # Ollama API client
├── history_manager.py # JSON-based history persistence
├── abstract_service.py # Orchestration (PDF → LLM → history)
├── requirements.txt # Python dependencies
├── sample_modelfile.txt # Ollama Modelfile template
├── data/
│ └── history.json # Persistent generation history
└── README.md # This file
1 git clone https://huggingface.co/Arunvarma2565/research-draft
2 cd research-draft
Download a GGUF model (e.g., from Hugging Face). Place the .gguf file in the project directory or note its path.
Edit sample_modelfile.txt — update the FROM line to point at your .gguf file:
FROM /path/to/your/model.gguf
Create the model in Ollama:
ollama create researchdraft -f sample_modelfile.txt
Verify it works:
1 ollama list # should show "researchdraft"
2 ollama run researchdraft "Hello" # quick sanity check
Leave this terminal open.
1 cd research-draft
2 python app.py
This project is for educational purposes (B.Tech final-year project). Use it freely for learning and research.