diff --git a/demo/web_demo.cpp b/demo/web_demo.cpp index 4376e186..a37a733e 100644 --- a/demo/web_demo.cpp +++ b/demo/web_demo.cpp @@ -13,7 +13,7 @@ int main(int argc, const char* argv[]) { if (argc < 3) { std::cout << "Usage: " << argv[0] << " model_dir web_dir" << std::endl; - std::cout << "Example: " << argv[0] << " ../qwen-1.8b-int4 ../resource/web" << std::endl; + std::cout << "Example: " << argv[0] << " ../qwen-1.8b-int4 ../web" << std::endl; return 0; } std::string model_dir = argv[1]; @@ -29,9 +29,8 @@ int main(int argc, const char* argv[]) { std::string last_request = ""; auto chat = [&](std::string str) { waiting = true; - llm->response(str, &ss); + llm->response(str, &ss, ""); std::cout << "### response : " << ss.str() << std::endl; - ss << ""; waiting = false; }; svr.Post("/chat", [&](const httplib::Request &req, httplib::Response &res) { @@ -50,9 +49,9 @@ int main(int argc, const char* argv[]) { } }); svr.set_mount_point("/", web_dir); - printf(">>> please open http://0.0.0.0:5088\n"); + printf(">>> please open http://0.0.0.0:8080 or http://localhost:8080\n"); fflush(stdout); - svr.listen("0.0.0.0", 5088); + svr.listen("0.0.0.0", 8080); printf(">>> end\n"); return 0; } diff --git a/resource/web/web_demo.png b/resource/web/web_demo.png deleted file mode 100755 index 259f7d98..00000000 Binary files a/resource/web/web_demo.png and /dev/null differ diff --git a/resource/web/css/github-markdown-light.min.css b/web/css/github-markdown-light.min.css similarity index 100% rename from resource/web/css/github-markdown-light.min.css rename to web/css/github-markdown-light.min.css diff --git a/resource/web/css/github.min.css b/web/css/github.min.css similarity index 100% rename from resource/web/css/github.min.css rename to web/css/github.min.css diff --git a/resource/web/css/katex.min.css b/web/css/katex.min.css similarity index 100% rename from resource/web/css/katex.min.css rename to web/css/katex.min.css diff --git a/resource/web/css/texmath.css b/web/css/texmath.css similarity index 100% rename from resource/web/css/texmath.css rename to web/css/texmath.css diff --git a/resource/web/index.html b/web/index.html similarity index 96% rename from resource/web/index.html rename to web/index.html index 15df782a..ac90effd 100644 --- a/resource/web/index.html +++ b/web/index.html @@ -693,7 +693,7 @@
-
ChatGLM-MNN
+
mnn-llm
diff --git a/resource/web/js/highlight.min.js b/web/js/highlight.min.js similarity index 100% rename from resource/web/js/highlight.min.js rename to web/js/highlight.min.js diff --git a/resource/web/js/katex.min.js b/web/js/katex.min.js similarity index 100% rename from resource/web/js/katex.min.js rename to web/js/katex.min.js diff --git a/resource/web/js/markdown-it-link-attributes.min.js b/web/js/markdown-it-link-attributes.min.js similarity index 100% rename from resource/web/js/markdown-it-link-attributes.min.js rename to web/js/markdown-it-link-attributes.min.js diff --git a/resource/web/js/markdown-it.min.js b/web/js/markdown-it.min.js similarity index 100% rename from resource/web/js/markdown-it.min.js rename to web/js/markdown-it.min.js diff --git a/resource/web/js/texmath.js b/web/js/texmath.js similarity index 100% rename from resource/web/js/texmath.js rename to web/js/texmath.js