intel / web-ai-showcase

Web AI Showcase for Web Assembly, WebGPU and WebNN.
https://intel.github.io/web-ai-showcase/
Apache License 2.0
18 stars 5 forks source link

Fetch models for China AI PC Dev Kit users #6

Open ibelem opened 3 months ago

ibelem commented 3 months ago

The models are inaccessible from huggingface.co in China, we need to solve this issue.

  1. Please check if we can switch the domain from https://huggingface.co to https://hf-mirror.com/ for Chinese users.
  2. See if we can load https://modelscope.cn/ via fetch API.

How can we detect if the user is coming from China on the Web?

  1. The https://ipinfo.io/ need to pay for the API access
  2. The Google Maps Geocoding API requires user's permissions for accessing Geolocation API at first

@NingW101

NingW101 commented 3 months ago

The models are inaccessible from huggingface.co in China, we need to solve this issue.

  1. Please check if we can switch the domain from https://huggingface.co to https://hf-mirror.com/ for Chinese users.
  2. See if we can load https://modelscope.cn/ via fetch API.

Both hf-mirror and modelScope restrict the cross-domain access, fetching resource directly is not available. So the solution is to require users to manually download model files and upload through the load models locally button in UI