mirror of
https://github.com/lucasjinreal/Namo-R1.git
synced 2026-01-13 22:07:17 +08:00
update usage
This commit is contained in:
parent
78579db90f
commit
e6ec3a2594
@ -71,10 +71,12 @@ A simple demo would be:
|
||||
from namo.api.vl import VLInfer
|
||||
|
||||
# model will download automatically
|
||||
model = VLInfer(model_type='namo')
|
||||
model = VLInfer(
|
||||
model_type="namo", device="cuda:0" if torch.cuda.is_available() else "cpu"
|
||||
)
|
||||
|
||||
# default will have streaming
|
||||
model.generate('what is this?', 'images/cats.jpg', stream=True)
|
||||
model.generate(images='images/cats.jpg', prompt='what is this?')
|
||||
```
|
||||
|
||||
That's all!
|
||||
|
||||
Loading…
Reference in New Issue
Block a user