{"id":25315872,"url":"https://github.com/sabdulrahman/llmflow","last_synced_at":"2026-05-02T17:36:08.081Z","repository":{"id":273267190,"uuid":"919157569","full_name":"sabdulrahman/LLMFlow","owner":"sabdulrahman","description":"This project allows users to upload a research paper or a document (word, txt, and PDF), generate a summary, and ask questions about its content using various Large Language Models (LLMs).","archived":false,"fork":false,"pushed_at":"2025-02-04T15:09:41.000Z","size":36809,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-11T10:57:26.556Z","etag":null,"topics":["deepseek-r1","document","langchain-python","llm","reactjs","summarization"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sabdulrahman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-01-19T20:57:51.000Z","updated_at":"2025-02-10T14:31:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"d32818d6-2a0f-45f6-bbf6-aa4628cc094f","html_url":"https://github.com/sabdulrahman/LLMFlow","commit_stats":null,"previous_names":["sabdulrahman/llmflow"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sabdulrahman/LLMFlow","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sabdulrahman%2FLLMFlow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sabdulrahman%2FLLMFlow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sabdulrahman%2FLLMFlow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sabdulrahman%2FLLMFlow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sabdulrahman","download_url":"https://codeload.github.com/sabdulrahman/LLMFlow/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sabdulrahman%2FLLMFlow/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269641292,"owners_count":24451994,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-09T02:00:10.424Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deepseek-r1","document","langchain-python","llm","reactjs","summarization"],"created_at":"2025-02-13T18:39:48.003Z","updated_at":"2025-10-14T05:23:27.561Z","avatar_url":"https://github.com/sabdulrahman.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LLMFlow: Summarization of Documents\nLLMFlow integrates GPT with LangChain, DeepSeek and LLama3.2 with Ollama to generate concise summaries of large-scale documents (research documents), reducing reading time and effort for academics. The project enhances accessibility and efficiency in reviewing literature.\n\nThis project allows users to upload a **research paper or a document (word, txt, and PDF)**, generate a **summary**, and ask **questions** about its content using various **Large Language Models (LLMs)** such as **Ollama, GPT, and DeepSeek**. \n\n## Features\n\n- **Upload document** – Supports `.txt``.docx``.pdf` format.\n- **Generate Summaries** – Extracts key sections and provides a concise summary.\n- **Chat with the Paper** – Ask questions and get AI-generated responses based on the document.\n- **Multiple LLMs Supported** – Choose from **Llama, GPT, or DeepSeek** for text processing.\n- **Context-Aware Responses** – Retrieves the most relevant sections from the document before answering.\n\n## App Screenshot\n![LLMFLow App Screenshot](llmflow.png)\n\n---\n## Technologies Used\n\n### **Frontend (React)**\n- **React.js** – For building the interactive chat interface.\n- **Tailwind CSS** – For styling and responsive design.\n- **JavaScript (ES6+)** – Used for frontend logic.\n- **Fetch API** – For making requests to the backend.\n- **React Hooks** (`useState`, `useEffect`, `useRef`) – For managing state and interactions.\n\n### **Backend (FastAPI)**\n- **FastAPI** – A modern Python web framework for handling API requests.\n- **Uvicorn** – ASGI server to run the FastAPI app.\n- **Pydantic** – Data validation for request bodies.\n- **CORS Middleware** – Enables cross-origin requests.\n\n### **Large Language Models (LLMs)**\n- **Ollama** – Runs local LLMs like `Llama3.2` for chat responses.\n- **GPT (OpenAI GPT-4o)** – (Optional) Used via LangChain for advanced processing.\n- **DeepSeek** – (Optional) Another LLM used for extraction.\n\n### **File Processing**\n- **PDFMiner** – Extracts text from uploaded PDFs.\n- **FuzzyWuzzy** – For text similarity matching to find relevant document sections.\n- **Regular Expressions (Regex)** – To detect and structure research paper sections.\n\n### **Additional Tools \u0026 Libraries**\n- **shutil \u0026 os** – For file handling.\n- **Logging** – For error tracking and debugging.\n\n---\n\n## Installation Guide\n\n### Clone the Repository\n\n```bash\ngit clone https://github.com/sabdulrahman/LLMFlow.git\ncd LLMFlow\n```\n\n### Set Up the Backend (FastAPI)\n\n#### Create and Activate a Virtual Environment\n\n```bash\npython -m venv venv\nsource venv/bin/activate  # On Windows use `venv\\Scripts\\activate`\n```\n\n#### Install Dependencies\n\n```bash\npip install -r requirements.txt\n```\n\n#### Run the FastAPI Server\n\nOn windows open the run.bat file.\n\n```bash\nuvicorn main:app --reload\n```\n\nThe **backend** will be running at: [`http://localhost:8000`](http://localhost:8000)\n\n---\n\n### Set Up the Frontend (React)\n\n```bash\ncd frontend\nnpm install\nnpm start\n```\n\nThe **frontend** will be available at: [`http://localhost:3000`](http://localhost:3000)\n\n---\n\n## Usage\n\n1. Open the web interface in your browser at [`http://localhost:3000`](http://localhost:3000).\n2. Upload a **PDF research paper**.\n3. The system will **generate a summary** of the document.\n4. Type your **question** related to the document in the chat.\n5. The system retrieves **relevant sections** and generates an **AI-powered response**.\n\n---\n\n## API Endpoints\n\n| Method | Endpoint           | Description |\n|--------|-------------------|-------------|\n| `POST` | `/upload-file`     | Upload a research paper (PDF) and extract sections. |\n| `POST` | `/process-message` | Process user queries with the selected LLM. |\n| `GET`  | `/`               | Check if the backend is running. |\n\n---\n## Environment Variables\nTo use **GPT-based processing**, create a `.env` file in the **backend directory** and add:\n```\nOPENAI_API_KEY=your_openai_api_key\n```\n---\n## Future Improvements\n- **Enhanced Document Processing** – Better PDF parsing and section extraction.\n- **Multi-Document Support** – Upload and interact with multiple documents.\n- **Advanced Query Matching** – Improve accuracy in retrieving document sections.\n---\n## Contributing\nContributions are welcome! Feel free to open an **issue** or submit a **pull request**.\n\n### License\n**MIT License**. See `LICENSE` for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsabdulrahman%2Fllmflow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsabdulrahman%2Fllmflow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsabdulrahman%2Fllmflow/lists"}