Skip to content
Merged
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
4 changes: 1 addition & 3 deletions charts/azimuth-image-analysis/azimuth-ui.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,5 @@ sortOrder:
- /azimuth-llm/ui/appSettings/llm_params/frequency_penalty
- /azimuth-llm/ui/appSettings/llm_params/presence_penalty
- /azimuth-llm/ui/appSettings/llm_params/top_p
# vLLM responds with HTTP 400 BadRequest when top_k is
# passed to a vision model (but ollama accepts it)
# - /azimuth-llm/ui/appSettings/llm_params/top_k
- /azimuth-llm/ui/appSettings/llm_params/top_k
- /azimuth-llm/api/modelMaxContextLength
7 changes: 7 additions & 0 deletions charts/azimuth-image-analysis/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,13 @@
"exclusiveMinimum": 0,
"maximum": 1
},
"top_k": {
"type": "integer",
"title": "LLM Top K",
"description": "The [top k](https://docs.vllm.ai/en/stable/dev/sampling_params.html) value to use when generating LLM responses (must be an integer).",
"default": -1,
"minimum": -1
},
"presence_penalty": {
"type": "number",
"title": "LLM Presence Penalty",
Expand Down
1 change: 1 addition & 0 deletions web-apps/chat/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ def inference_wrapper(*args):
height="75vh",
resizable=True,
sanitize_html=True,
autoscroll=False,
latex_delimiters=[
{"left": "$$", "right": "$$", "display": True },
{"left": "$", "right": "$", "display": False }
Expand Down
11 changes: 7 additions & 4 deletions web-apps/image-analysis/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,14 @@ def analyze_image(image_url, prompt):
app = gr.Interface(
fn=analyze_image,
inputs=[
gr.Textbox(label="Image URL"),
gr.Textbox(label="Prompt/Question", elem_id="prompt", scale=2),
gr.Textbox(label="Image URL", lines=2),
gr.Textbox(label="Prompt/Question", elem_id="prompt", scale=2, lines=2),
],
outputs=[gr.Image(label="Image"), gr.Textbox(label="Results")],
flagging_mode='never',
outputs=[
gr.Image(label="Image"),
gr.Textbox(label="Results", lines=2, autoscroll=False),
],
flagging_mode="never",
title=settings.page_title,
description=settings.page_description,
examples=[[ex.image_url, ex.prompt] for ex in settings.examples],
Expand Down
6 changes: 3 additions & 3 deletions web-apps/image-analysis/gradio-client-test.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
gradio_host = sys.argv[1]

retries = 60
for n in range(1, retries+1):
for n in range(1, retries + 1):
try:
client = Client(gradio_host)
result = client.predict(
image_url="https://media.licdn.com/dms/image/v2/D4D0BAQHyxNra6_PoUQ/company-logo_200_200/company-logo_200_200/0/1704365018113/stackhpc_ltd_logo?e=1747872000&v=beta&t=Ed3-KZS-sHlg-ne1KC0YjI4Ez7yVvJzWr103nm5eVK0",
prompt="Hi",
api_name="/predict"
prompt="Hi",
api_name="/predict",
)
print(result)
break
Expand Down