Spaces:
Runtime error
Runtime error
Download app.py from liangtm/WeVisOne-VL: direct link, hf CLI and curl.
- Browser
- Download file 447 Bytes
-
https://huggingface.co/spaces/liangtm/WeVisOne-VL/resolve/main/app.py
- Command line
-
hf download hf://spaces/liangtm/WeVisOne-VL/app.py
-
curl -L -o app.py https://huggingface.co/spaces/liangtm/WeVisOne-VL/resolve/main/app.py
447 Bytes
| import os | |
| import spaces | |
| from demo.app import EXAMPLES_IMAGE_DIR, _style_kwargs, build_demo | |
| from wevisone_vl import WeVisOneVL | |
| MODEL_ID = os.environ.get("WEVISONE_MODEL", "tencent/WeVisOne-VL-4B") | |
| engine = WeVisOneVL(MODEL_ID, backend="transformers", device="cuda") | |
| engine.predict = spaces.GPU(duration=120)(engine.predict) | |
| demo = build_demo(engine) | |
| demo.queue() | |
| demo.launch(allowed_paths=[str(EXAMPLES_IMAGE_DIR)], **_style_kwargs("launch")) | |