]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commitdiff
server : fix hardcoded /inference path in default HTML page (#3639)
authorSid Mohan <redacted>
Mon, 9 Feb 2026 08:10:13 +0000 (00:10 -0800)
committerGitHub <redacted>
Mon, 9 Feb 2026 08:10:13 +0000 (10:10 +0200)
Closes #3596

examples/server/server.cpp

index b77d8a3ed46b7920e3f0f1f25120dff51fd6400d..c5354efc3149d607be57c69fe3f9601982c75f52 100644 (file)
@@ -748,9 +748,9 @@ int main(int argc, char ** argv) {
     <body>
         <h1>Whisper.cpp Server</h1>
 
-        <h2>/inference</h2>
+        <h2>)" + sparams.request_path + sparams.inference_path + R"(</h2>
         <pre>
-    curl 127.0.0.1:)" + std::to_string(sparams.port) + R"(/inference \
+    curl 127.0.0.1:)" + std::to_string(sparams.port) + sparams.request_path + sparams.inference_path + R"( \
     -H "Content-Type: multipart/form-data" \
     -F file="@&lt;file-path&gt;" \
     -F temperature="0.0" \
@@ -767,7 +767,7 @@ int main(int argc, char ** argv) {
 
         <div>
             <h2>Try it out</h2>
-            <form action="/inference" method="POST" enctype="multipart/form-data">
+            <form action=")" + sparams.request_path + sparams.inference_path + R"(" method="POST" enctype="multipart/form-data">
                 <label for="file">Choose an audio file:</label>
                 <input type="file" id="file" name="file" accept="audio/*" required><br>