Spaces:
Running on Zero
Running on Zero
| title: MarkushGlyph | |
| emoji: π§ͺ | |
| colorFrom: gray | |
| colorTo: purple | |
| sdk: gradio | |
| sdk_version: 6.23.1 | |
| app_file: app.py | |
| short_description: Extract Markush CXSMILES from chemical structure images | |
| python_version: "3.12" | |
| startup_duration_timeout: 30m | |
| # MarkushGlyph β Markush Structure Recognition | |
| This Space demonstrates **MarkushGlyph**, a vision-language model (LoRA fine-tune of | |
| [Qwen3.5-2B-Base](https://huggingface.co/Qwen/Qwen3.5-2B-Base)) that converts images | |
| of patent Markush chemical structures into [CXSMILES](https://docs.chemaxon.com/display/docs/chemaxon-extended-smiles-and-smarts.md) strings. | |
| ## How it works | |
| 1. Upload an image of a chemical structure (Markush or ordinary molecule). | |
| 2. The model extracts the structure and returns it in the XML format | |
| `<markush><cxsmi>...</cxsmi><stable>...</stable></markush>`. | |
| 3. The CXSMILES core and stable-group definitions are displayed separately for | |
| easy copying. | |
| ## Model | |
| - **Base model:** [Qwen/Qwen3.5-2B-Base](https://huggingface.co/Qwen/Qwen3.5-2B-Base) | |
| - **LoRA adapter:** [EdisonScientific/MarkushGlyph](https://huggingface.co/EdisonScientific/MarkushGlyph) (r=128, alpha=128) | |
| - **Code:** [github.com/EdisonScientific/glyph](https://github.com/EdisonScientific/glyph) (Apache-2.0) | |
| ## Example images | |
| The example images are from the [glyph repository](https://github.com/EdisonScientific/glyph) | |
| (Apache-2.0 license): | |
| - `markush_m2s_13.png` β a Markush structure crop from the M2S benchmark | |
| - `imatinib.png` β the drug imatinib (CββHββNβO) | |
| - `cholesterol_ester.png` β a cholesterol ester structure |