--- license: apache-2.0 ---

OneChart: Purify the Chart Structural Extraction via One Auxiliary Token

Jinyue Chen*, Lingyu Kong*, [Haoran Wei](https://scholar.google.com/citations?user=J4naK0MAAAAJ&hl=en), Chenglong Liu, [Zheng Ge](https://joker316701882.github.io/), Liang Zhao, [Jianjian Sun](https://scholar.google.com/citations?user=MVZrGkYAAAAJ&hl=en), Chunrui Han, [Xiangyu Zhang](https://scholar.google.com/citations?user=yuB-cfoAAAAJ&hl=en) [Github](https://github.com/LingyvKong/OneChart) [arxiv](https://arxiv.org/abs/2404.09987) ## Quickly try the demo using hugginface: ```python from transformers import AutoModel, AutoTokenizer tokenizer = AutoTokenizer.from_pretrained('kppkkp/OneChart', trust_remote_code=True, use_fast=False, padding_side="right") model = AutoModel.from_pretrained('kppkkp/OneChart', trust_remote_code=True, low_cpu_mem_usage=True, device_map='cuda') model = model.eval().cuda() # input your test image image_file = 'image.png' res = model.chat(tokenizer, image_file, reliable_check=True) print(res) ```