Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RepurposeRx

dark

🚀 Bridging AI & Drug Repurposing: Unlocking New Possibilities 🧬💊

In the ever-evolving landscape of AI and healthcare, I'm working on an MVP that connects a SwiftUI frontend with a Flask-based Python backend powered by DeepSeek 7B (via Ollama) to facilitate rare disease queries and drug repurposing insights.

🔍 The Goal?

To harness reasoning LLMs for drug repurposing insights by integrating public biomedical datasets and leveraging LLM-powered retrieval to assist medical professionals and researchers in accelerating discoveries.

💡 Key Data Sources:

📌 Drug Information – DrugBank, PubChem, ChEMBL, RxNorm 📌 Target & Pathways – UniProt, KEGG, Reactome, Human Protein Atlas 📌 Disease Insights – OMIM, MeSH, ICD-10, DisGeNET 📌 Clinical Trials & Literature – ClinicalTrials.gov, PubMed, Google Scholar

sss

⚡ Why This Matters?

Drug discovery is expensive & time-consuming. By utilizing LLMs with Test-Time Compute, we can:

✅ Fast-track insights & hypothesis generation ✅ Uncover new therapeutic uses ✅ Enable data-driven decision-making for researchers

ss

🔭 Future Directions: Expanding AI’s Role in Drug Repurposing

🤖 AI Agents for Data Collection & Thinking

Automated biomedical data gathering from structured (databases, APIs) and unstructured (papers, patents) sources. Multi-agent collaboration: Specialized retrieval agents, reasoning agents, and verification agents working in tandem.

🧠 Co-Researcher AI Agents

AI-powered co-researchers that simulate expert reasoning, suggest hypotheses, and validate findings. Multi-modal LLMs to integrate text, molecular structures, and clinical data.

⚙️ Advancing Retrieval & Reasoning

Retrieval-Augmented Generation (RAG): Enhancing LLMs with real-time access to biomedical literature & trials. GraphRAG: Leveraging knowledge graphs for a structured, explainable approach to drug repurposing. Dynamic Test-Time Compute Reasoning: Using LLMs not just for retrieval but for complex biomedical inference at runtime.

🎯 The Tech Stack:

🖥️ Frontend: SwiftUI for a clean, intuitive UX ⚙️ Backend: Flask API with RESTful endpoints & CORS 🧠 AI Model: DeepSeek 7B for reasoning-driven biomedical queries 🔍 Data Processing: RAG, GraphRAG, and multi-agent workflows

By bridging LLM reasoning, real-time retrieval, and multi-agent collaboration, we’re pushing drug repurposing & biomedical research into a new era of AI-driven discovery. 🚀🔬


Getting Started

Prerequisites

  • Python 3.9+ — for the Flask backend
  • Ollama — local LLM runtime (must be installed and running)
  • Xcode 15+ — for the SwiftUI iOS/macOS frontend
  • iOS 16+ / macOS 13+ — minimum deployment target

Installation

1. Clone the repository

git clone https://github.com/rathodkunj2005/RePurposeRx.git
cd RePurposeRx

2. Set up the Python backend

Install Python dependencies:

pip install -r requirements.txt flask flask-cors

Pull the required Ollama models (Ollama must already be running):

ollama pull llama3.2:latest
ollama pull deepseek-r1:7b

3. Configure environment variables (optional)

All configuration values have sensible defaults (see RePurposeRx/Sources/config.py). To override them, export variables before starting the server or add them to a .env file:

# LLM model selection
export METADATA_EXTRACTION_MODEL=llama3.2:latest
export RESPONSE_GENERATION_MODEL=deepseek-r1:7b

# Optional: API keys for extended data sources
export OMIM_API_KEY=your_omim_api_key
export DISGENET_API_KEY=your_disgenet_api_key

4. Open the SwiftUI frontend in Xcode

Open Package.swift in Xcode. Before building, update the teamIdentifier field in Package.swift with your Apple Developer Team ID. Select your target device or simulator, then press Run.

Running Locally

Start the Flask backend:

cd RePurposeRx/Sources
python server.py

The API will be available at http://localhost:5000. You can smoke-test it with:

curl -X POST http://localhost:5000/deepseek \
     -H "Content-Type: application/json" \
     -d '{"query": "What drugs could be repurposed for Alzheimer disease?"}'

Launch the SwiftUI app:

Run the app from Xcode (⌘R) on your target device or simulator. Make sure the Flask backend is running before sending queries from the app.

Running Tests

No automated tests are included yet — contributions are welcome!

About

RePurposeRx

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages