Instructions to use KhimNguyen/chart2text with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use KhimNguyen/chart2text with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="KhimNguyen/chart2text")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("KhimNguyen/chart2text") model = AutoModelForMultimodalLM.from_pretrained("KhimNguyen/chart2text", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use KhimNguyen/chart2text with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "KhimNguyen/chart2text" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "KhimNguyen/chart2text", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/KhimNguyen/chart2text
- SGLang
How to use KhimNguyen/chart2text with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "KhimNguyen/chart2text" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "KhimNguyen/chart2text", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "KhimNguyen/chart2text" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "KhimNguyen/chart2text", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use KhimNguyen/chart2text with Docker Model Runner:
docker model run hf.co/KhimNguyen/chart2text
Commit History
-
Update README.md
cfcb2e6
-
Training done
05bb015 -
Training done
8ac6238 -
Config
de6ee12 -
Training in progress, epoch 1
2774252 -
Config
9d2aff1 -
Training in progress, epoch 0
cb1f1d4 -
Training done
265fa7d -
Training done
7457b48 -
Config
2f28a6c -
Training in progress, epoch 0
f2d32e2
-
Training done
dd084e5 -
Training done
b9c8722 -
Config
a3cc8a4 -
Training in progress, epoch 0
216df92
-
Training done
8fa99ac -
Training done
bfe7f0f -
Config
a2d7dec -
Training in progress, epoch 0
055c724
-
Training done
174cbff -
Training done
cc1e605 -
Config
c998e50 -
Training in progress, epoch 0
b685c4f -
Training done
f97c2a8 -
Training done
92667a1 -
Config
d022191 -
Training in progress, epoch 1
25b9460 -
Config
2374d2d -
Training in progress, epoch 0
cc01055 -
Training done
d50bfc4 -
Training done
3a32132 -
Config
f4b7d58 -
Training in progress, epoch 0
b9d3cfc -
Training done
476cf54 -
Training done
15e2e2f -
Config
364003c -
Training in progress, epoch 1
aca53b5 -
Config
f06f036 -
Training in progress, epoch 0
20787cf
-
Training done
d098d30 -
Training done
be8b0fa -
Config
71d0d0a -
Training in progress, epoch 0
44b00ab -
Config
8945053 -
Training in progress, epoch 0
75f19c0 -
Config
a484ee9 -
Training in progress, epoch 0
6ef3535
-
Config
3c9512b -
Training in progress, epoch 1
ebc144a -
Config
b6f3ec0