36 lines
842 B
Markdown
36 lines
842 B
Markdown
# A FastVLM webserver
|
|
[fastvlm](https://github.com/apple/ml-fastvlm) is apple released a open source
|
|
multiple modal llm, it can input image, promt and generate text
|
|
|
|
## Create virtual environment
|
|
```
|
|
python3 -m venv ~/fastvlm.env
|
|
source ~/fastvlm/bin/activate
|
|
```
|
|
|
|
## Installation
|
|
```
|
|
git clone https://github.com/apple/ml-fastvlm.git
|
|
cd ml-fastvlm
|
|
pip install -U .
|
|
git clone https://git.kaiyuancloud.cn/yumoqing/fvlm.git
|
|
pip install git+https://git.kaiyuancloud.cn/yumoqing/apppublic.git
|
|
pip install git+https://git.kaiyuancloud.cn/yumoqing/sqlor.git
|
|
pip install git+https://git.kaiyuancloud.cn/yumoqing/ahserver.git
|
|
```
|
|
|
|
## start web server
|
|
```
|
|
cd fvlm
|
|
python app/fastvlm.py
|
|
```
|
|
the server will bind on port 9994
|
|
|
|
## Usage
|
|
```
|
|
curl http://localhost:9994/v1/generate \
|
|
-F "prompt=描述这张图片" \
|
|
-F "image_path=@path_to_image"
|
|
```
|
|
|