Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Only generate output when --verbose False #9

Closed
s-smits opened this issue Apr 25, 2024 · 4 comments
Closed

[Feature Request] Only generate output when --verbose False #9

s-smits opened this issue Apr 25, 2024 · 4 comments

Comments

@s-smits
Copy link

s-smits commented Apr 25, 2024

import subprocess
import sys

command = [
    sys.executable, 
    '-m', 'mlx_vlm.generate',
    '--model', 'qnguyen3/nanoLLaVA',
    '--max-tokens', '100',
    '--temp', '0.0',
    '--image', "http://images.cocodataset.org/val2017/000000039769.jpg",
]

result = subprocess.run(command, capture_output=True, text=True)
caption = result.stdout
print(caption)

Currently:
Gives input including template, output and speeds

Proposed:
with --verbose False only generate the output in the terminal, which makes it easier to interpret the results for further use.

@Blaizzy
Copy link
Owner

Blaizzy commented Apr 25, 2024

Hey @s-smits

That makes a lot of sense.

I will add it to the next release I'm working on

@Blaizzy
Copy link
Owner

Blaizzy commented Apr 25, 2024

How about this?

image

@Blaizzy
Copy link
Owner

Blaizzy commented Apr 25, 2024

However, streaming is disabled, so you'll wait for the final answer.

@Blaizzy
Copy link
Owner

Blaizzy commented May 3, 2024

This is done ✅ on the latest release !

#10

@Blaizzy Blaizzy closed this as completed May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants