mirror of
https://github.com/ggml-org/whisper.cpp.git
synced 2026-09-30 19:41:14 +02:00
examples : add wchess.wasm to wasm examples build (#3443)
* examples : add wchess.wasm to wasm examples build This commit add the wchess.wasm example to the wasm examples that are deployed to https://ggml.ai/whisper.cpp. Refs: https://github.com/ggml-org/whisper.cpp/issues/3434#issuecomment-3346980420
This commit is contained in:
+6
-1
@@ -47,7 +47,12 @@ class CustomHTTPRequestHandler(http.server.SimpleHTTPRequestHandler):
|
||||
|
||||
elif actual_path == '/':
|
||||
self.path = '/whisper.wasm/index.html'
|
||||
elif actual_path.startswith('/bench.wasm/') or actual_path.startswith('/command.wasm/') or actual_path.startswith('/stream.wasm/'):
|
||||
elif any(actual_path.startswith(prefix) for prefix in (
|
||||
'/bench.wasm/',
|
||||
'/command.wasm/',
|
||||
'/stream.wasm/',
|
||||
'/wchess.wasm/'
|
||||
)):
|
||||
# Keep the path as is, just remove the context root
|
||||
self.path = actual_path
|
||||
# For all other paths under the context root
|
||||
|
||||
Reference in New Issue
Block a user