Skip to content

Commit

Permalink
add simplest demo
Browse files Browse the repository at this point in the history
  • Loading branch information
teowu committed Nov 6, 2023
1 parent 57bf9c4 commit 130ed9d
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,53 @@
<img style="width:100%" src="new_q_instruct.png">
</div>
</div>


## Quick Start

- LLaVA-v1.5

1. Install LLaVA.

```shell
git clone https://github.com/haotian-liu/LLaVA.git
cd LLaVA
pip install -e ".[train]"
```

2. Automatically download the pre-trained weights from Q-Instruct.

```python
from llava.mm_utils import get_model_name_from_path
from llava.eval.run_llava import eval_model

# default LLaVA-v1.5 (7B)
# change to `model_path = "teowu/llava_v1.5_13b_qinstruct_preview_v0.1"` for LLaVA-v1.5 (13B)
model_path = "teowu/llava_v1.5_7b_qinstruct_preview_v0.1"

prompt = "Which is the darkest corner of the image?"
image_file = "fig/sausage.jpg"

args = type('Args', (), {
"model_path": model_path,
"model_base": None,
"model_name": get_model_name_from_path(model_path),
"query": prompt,
"conv_mode": None,
"image_file": image_file,
"sep": ",",
})()

eval_model(args)
```

- mPLUG-Owl-2

Coming soon.

- InternLM-XComposer-VL

Coming soon.


## Model Zoo
Expand Down
Binary file added fig/sausage.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 130ed9d

Please sign in to comment.