Spaces:
Runtime error
Runtime error
File size: 4,150 Bytes
3e75db3 ce67dc2 66096d4 ce67dc2 66096d4 ce67dc2 3e75db3 | 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 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 | ---
title: π€ VCell BioModel Chatbot
emoji: π§¬
colorFrom: blue
colorTo: purple
sdk: streamlit
sdk_version: 1.44.1
app_file: app.py
pinned: true
license: mit
short_description: Demo Chatbot to query VCell modeling resources
---
<h1 align="center">VCell BioModel Chatbot Demo</h1>
<p align="center">
<img src="misc/gsoc.png" alt="Google Summer of Code Logo" width="100"/>
<img src="misc/NRNB.png" alt="NRNB Logo" width="200"/>
<br><br>
<a href="https://share.streamlit.io/KacemMathlouthi/VCell-Demo">
<img src="https://static.streamlit.io/badges/streamlit_badge_black_white.svg" alt="View in Streamlit" />
</a>
</p>
This demo presents an intelligent chatbot interface for querying and interpreting biomodels stored in the [VCell BioModel Database](https://vcell.cam.uchc.edu/api/v0/biomodel). It enables users to interact with biological modeling resources using natural language and provides structured outputs, model metadata, downloadable files, and visualizations in real time. This work was developed as a demo for the NRNB Organization for **Google Summer of Code 2025**.
<p align="center">
<img src="https://i.imgur.com/FgayjY9.png" alt="GSoC VCell Demo" width = "600" />
</p>
---
## Overview
This chatbot is an AI-powered assistant capable of:
- Interpreting natural language queries
- Extracting structured parameters
- Querying the VCell API
- Summarizing model data in a human-readable way using a large language model (LLM)
- Visualizing model diagrams
- Providing downloadable model files
---
## Features
- **Natural Language Interface** β Query the database with simple English prompts
- **LLM Parameters Extraction** β Uses LLaMA 3 to extract structured parameters
- **VCell API Integration** β Supports dynamic querying with filters like author, category, biomodelid...
- **Summarization** β Generates high-level descriptions of model contents in a human
[gif of parameters extraction, API response and summarization]
- **Visualization** β Displays system reaction diagrams from the API
- **Download Options** β Direct links to SBML and VCML formats for downstream use
[gif of downloading the provided files and visualizations]
- **Streamlit UI** β Minimalist, responsive, and easy to deploy
---
## Technologies Used
- Python
- Streamlit
- Groq API for the LLM (LLaMA 3.3-70B)
- VCell Public API
- Pydantic (parameter schema)
- Dotenv (secret management)
---
## Getting Started
### Prerequisites
- Python 3.10 or higher
- A valid Groq API key
### Installation
```bash
git clone https://github.com/KacemMathlouthi/VCell-Demo.git
cd VCell-Demo
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
```
### Configuration
Create a `.env` file at the root of the project:
```env
LLM_API_KEY=your_groq_api_key_here
```
### Run the Application
```bash
streamlit run app.py
```
Visit `http://localhost:8501` to start using the chatbot.
---
## Example Prompts
Here are some questions the chatbot can understand:
- `List all public models by user ion`
- `Find the model with ID 201844485`
- `Show VCell models related to calcium`
---
## Project Structure
```
βββ app.py # Main application entry point
βββ requirements.txt # Project dependencies
βββ .env # Environment variable for API key
βββ .streamlit/config.toml # UI configuration
βββ vcelldb/
β βββ vcell_api.py # Wrapper for VCell API calls
β βββ diagram.py # Utilities for diagrams and downloads
β βββ params_model.py # Schema definitions
βββ utils/
βββ llm_helper.py # LLM instance creation and response generation
βββ params_extraction.py # Prompt-to-parameter process
```
---
## License
This project is licensed under the [MIT License](LICENSE). You are free to use, modify, and distribute the software with proper attribution.
Special thanks to the **Virtual Cell (VCell)** team and the **National Resource for Network Biology (NRNB)** for their support.
For more information, visit [vcell.org](https://vcell.org). |