summaryrefslogtreecommitdiffstats
path: root/g4f/gui/server/app.py
diff options
context:
space:
mode:
authorH Lohaus <hlohaus@users.noreply.github.com>2024-03-16 18:22:26 +0100
committerGitHub <noreply@github.com>2024-03-16 18:22:26 +0100
commitfb2061da48525edab9cd993205bb5e30c386aa1a (patch)
tree1e740bd6955dfd27b9a4d773df07234ed9e5c75e /g4f/gui/server/app.py
parentMerge pull request #1694 from ComRSMaster/main (diff)
parentAdd conversation support for Bing (diff)
downloadgpt4free-fb2061da48525edab9cd993205bb5e30c386aa1a.tar
gpt4free-fb2061da48525edab9cd993205bb5e30c386aa1a.tar.gz
gpt4free-fb2061da48525edab9cd993205bb5e30c386aa1a.tar.bz2
gpt4free-fb2061da48525edab9cd993205bb5e30c386aa1a.tar.lz
gpt4free-fb2061da48525edab9cd993205bb5e30c386aa1a.tar.xz
gpt4free-fb2061da48525edab9cd993205bb5e30c386aa1a.tar.zst
gpt4free-fb2061da48525edab9cd993205bb5e30c386aa1a.zip
Diffstat (limited to 'g4f/gui/server/app.py')
-rw-r--r--g4f/gui/server/app.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/g4f/gui/server/app.py b/g4f/gui/server/app.py
index 2b55698c..869d3880 100644
--- a/g4f/gui/server/app.py
+++ b/g4f/gui/server/app.py
@@ -1,3 +1,9 @@
+import sys, os
from flask import Flask
-app = Flask(__name__, template_folder='./../client/html') \ No newline at end of file
+if getattr(sys, 'frozen', False):
+ template_folder = os.path.join(sys._MEIPASS, "client")
+else:
+ template_folder = "../client"
+
+app = Flask(__name__, template_folder=template_folder, static_folder=f"{template_folder}/static") \ No newline at end of file