Skip to content

Ask Qwen Task#406

Merged
annehaley merged 14 commits into
masterfrom
first-hf-task
Jun 30, 2026
Merged

Ask Qwen Task#406
annehaley merged 14 commits into
masterfrom
first-hf-task

Conversation

@annehaley

Copy link
Copy Markdown
Collaborator

This PR adds a new analytics task called "Imagery: Ask Qwen". The task accepts three inputs: 1) an imagery raster, 2) a text prompt, and 3) a max_tokens value (1k - 10k). The task leverages our first Huggingface inference endpoint, sending a lower resolution version of the imagery to the endpoint along with the question and returning the response to the user.

The screenshots below show some example runs on the boston orthoimagery layer:
geodatalytics_imagery_ask_qwen_task
geodatalytics_imagery_ask_qwen_2

To support the large markdown responses, this PR makes a slight change to the Analytics Panel in the client, using vue-markdown-render for a new output type "markdown".

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 18, 2026

Copy link
Copy Markdown

Deploying geodatalytics with  Cloudflare Pages  Cloudflare Pages

Latest commit: c9ad678
Status: ✅  Deploy successful!
Preview URL: https://894360ba.geodatalytics.pages.dev
Branch Preview URL: https://first-hf-task.geodatalytics.pages.dev

View logs

Comment thread uvdat/settings/base.py Outdated
Co-authored-by: Brian Helba <brian.helba@kitware.com>
Comment thread uvdat/settings/base.py
Comment thread uvdat/core/tasks/analytics/imagery_ask_qwen.py Outdated
Comment thread uvdat/core/tasks/analytics/imagery_ask_qwen.py Outdated
Comment thread uvdat/core/tasks/analytics/imagery_ask_qwen.py Outdated
Comment thread uvdat/core/tasks/analytics/imagery_ask_qwen.py Outdated
Comment thread uvdat/core/tasks/analytics/imagery_ask_qwen.py
Comment thread uvdat/core/tasks/analytics/imagery_ask_qwen.py Outdated
Comment thread uvdat/core/tasks/analytics/imagery_ask_qwen.py
Comment thread uvdat/core/tasks/analytics/imagery_ask_qwen.py Outdated
Comment thread pyproject.toml Outdated
Comment thread uvdat/core/tasks/analytics/imagery_ask_qwen.py Outdated
@annehaley annehaley force-pushed the first-hf-task branch 2 times, most recently from 568bba8 to c0eb8b3 Compare June 25, 2026 17:15
Co-authored-by: Brian Helba <brian.helba@kitware.com>
Comment thread uvdat/core/tasks/analytics/imagery_ask_qwen.py Outdated
Comment thread terraform/django.tf
DJANGO_DATABASE_POOL_MAX_SIZE = "12"
DJANGO_SENTRY_DSN = "https://5302701c88f1fa6ec056e0c269071191@o267860.ingest.us.sentry.io/4510620385804288"
DJANGO_UVDAT_HF_NAMESPACE = "Kitware"
DJANGO_UVDAT_HF_ENDPOINT_NAMES = "qwen=qwen3-5-9b-gguf-ulh,"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

If you end up with any more of these, you can use some Terraform syntax like:

locals {
  huggingface_endpoint_names = {
    qwen = "qwen3-5-9b-gguf-ulh"
  }
}

module "django" {
  ...
  additional_django_vars = {
    ...
    DJANGO_UVDAT_HF_ENDPOINT_NAMES = join(",", [for k, v in local.huggingface_endpoint_names : "${k}=${v}"])
  }
}

Maybe it's overkill for now, but worth remembering in the future.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Ok, thanks. I agree that we can use this in the future when we add more endpoints to the mapping.

@brianhelba brianhelba left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

2 minor suggestions inline, otherwise looks good.

Co-authored-by: Brian Helba <brian.helba@kitware.com>
@annehaley annehaley requested a review from manthey June 30, 2026 15:59
@annehaley annehaley merged commit 81673c6 into master Jun 30, 2026
3 checks passed
@annehaley annehaley deleted the first-hf-task branch June 30, 2026 16:25
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

Successfully merging this pull request may close these issues.

3 participants