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

Add docai inference server capability #1520

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/evaluate_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@

'image_file',
'image_control',
'base_model'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, we use visible_models for this. Even though it sounds plural, for API it can just be single string.

]

# form evaluate defaults for submit_nochat_api
Expand Down
4 changes: 3 additions & 1 deletion src/gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -4529,7 +4529,7 @@ def evaluate(
if not stream_output and img_file == 1:
from src.vision.utils_vision import get_llava_response
response, _ = get_llava_response(**llava_kwargs)

yield dict(response=response, sources=[], save_dict={}, error='', llm_answers={},
response_no_refs=response, sources_str='', prompt_raw='')
else:
Expand Down Expand Up @@ -4665,6 +4665,7 @@ def evaluate(

image_file=img_file,
image_control=None, # already stuffed into image_file
base_model=base_model,
)
assert len(set(list(client_kwargs.keys())).symmetric_difference(eval_func_param_names)) == 0
api_name = '/submit_nochat_api' # NOTE: like submit_nochat but stable API for string dict passing
Expand Down Expand Up @@ -5396,6 +5397,7 @@ def mean(a):""", ''] + params_list,
tts_speed,
image_file,
image_control,
None,
]
# adjust examples if non-chat mode
if not chat:
Expand Down
Loading