Spaces:
Sleeping
Sleeping
Update README.md
Browse files
README.md
CHANGED
@@ -1,102 +1,3 @@
|
|
1 |
-
|
2 |
-
# ๐งฌ Biological Network Analyzer
|
3 |
-
|
4 |
-
An intelligent assistant for analyzing biological networks from **text or image input**. This app can extract reaction networks from uploaded diagrams using **Gemini Vision API**, parse them into graph structures, and generate:
|
5 |
-
|
6 |
-
- ๐ ODEs (Ordinary Differential Equations)
|
7 |
-
- ๐งฎ Jacobian matrices
|
8 |
-
- ๐ Cyclic dependency checks
|
9 |
-
- ๐ Graph stats (edges, variables)
|
10 |
-
|
11 |
-
All via a **Gradio-based conversational interface**.
|
12 |
-
|
13 |
-
---
|
14 |
-
|
15 |
-
## ๐ Features
|
16 |
-
|
17 |
-
- ๐ค **Text input** (e.g. `A + B -> C, C <-> D`)
|
18 |
-
- ๐ผ๏ธ **Image input** (upload scanned or digital diagrams)
|
19 |
-
- ๐ง Google Gemini API integration to extract text-based reactions from images
|
20 |
-
- ๐งช ODE system generation using mass-action kinetics
|
21 |
-
- ๐ง Jacobian matrix computation via symbolic algebra (SymPy)
|
22 |
-
- ๐ Cycle detection and variable/edge counting
|
23 |
-
- ๐ค LLM-based fallback Q&A via `flan-t5-base`
|
24 |
-
- ๐จ Customizable Gradio theme (e.g. `Soft`, `Glass`, etc.)
|
25 |
-
|
26 |
-
---
|
27 |
-
|
28 |
-
## ๐งฐ Tech Stack
|
29 |
-
|
30 |
-
| Component | Technology |
|
31 |
-
|---------------|-------------------------------|
|
32 |
-
| Frontend UI | [Gradio](https://gradio.app) |
|
33 |
-
| LLM Query | [Flan-T5](https://huggingface.co/google/flan-t5-base) |
|
34 |
-
| Image-to-Text | [Gemini API](https://ai.google.dev/) (Vision multimodal API) |
|
35 |
-
| Graph Parsing | [NetworkX](https://networkx.org) |
|
36 |
-
| Symbolic Math | [SymPy](https://www.sympy.org/) |
|
37 |
-
|
38 |
-
---
|
39 |
-
|
40 |
-
## ๐ฅ๏ธ Running the App on your device
|
41 |
-
|
42 |
-
### โ
Prerequisites
|
43 |
-
|
44 |
-
- Python โฅ 3.8
|
45 |
-
- Install dependencies:
|
46 |
-
|
47 |
-
```bash
|
48 |
-
pip install gradio transformers networkx sympy google-generativeai python-dotenv pillow
|
49 |
-
````
|
50 |
-
|
51 |
-
* Set your Gemini API key in a `.env` file:
|
52 |
-
|
53 |
-
```
|
54 |
-
GEMINI_API=your_api_key_here
|
55 |
-
```
|
56 |
-
|
57 |
-
### โถ๏ธ Run
|
58 |
-
|
59 |
-
```bash
|
60 |
-
python your_script.py
|
61 |
-
```
|
62 |
-
|
63 |
-
Or use inside a [Google Colab notebook](https://colab.research.google.com/) for instant testing.
|
64 |
-
|
65 |
-
---
|
66 |
-
|
67 |
-
## ๐ท Example Inputs
|
68 |
-
|
69 |
-
### Text:
|
70 |
-
|
71 |
-
```
|
72 |
-
A + B -> C, C <-> D, D -> E
|
73 |
-
```
|
74 |
-
|
75 |
-
### Image:
|
76 |
-
|
77 |
-
* Upload PNG or JPG of a biological reaction network
|
78 |
-
* Gemini will parse it automatically
|
79 |
-
|
80 |
-
---
|
81 |
-
|
82 |
-
## ๐ Future Additions
|
83 |
-
|
84 |
-
* Export ODEs/Jacobian as LaTeX/PDF
|
85 |
-
* Stoichiometry & reaction rate customization
|
86 |
-
|
87 |
-
---
|
88 |
-
|
89 |
-
## ๐งโ๐ฌ Author
|
90 |
-
|
91 |
-
Built by \[Devansh] for a project on **LLM-based Equation Discovery from Biological Networks**.
|
92 |
-
|
93 |
-
---
|
94 |
-
|
95 |
-
## ๐ License
|
96 |
-
|
97 |
-
MIT License
|
98 |
-
|
99 |
-
|
100 |
---
|
101 |
title: Network Analyzer
|
102 |
emoji: ๐ฆ
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
title: Network Analyzer
|
3 |
emoji: ๐ฆ
|