summaryrefslogtreecommitdiffstats
path: root/g4f/gui/server/app.py
diff options
context:
space:
mode:
authorHeiner Lohaus <hlohaus@users.noreply.github.com>2024-03-15 11:46:06 +0100
committerHeiner Lohaus <hlohaus@users.noreply.github.com>2024-03-15 11:46:06 +0100
commit8cc6000ffbf4e12bf6c1d5e5878d376e36857ec0 (patch)
treeea190c7017d8e8982e63a502da0a828d5ba42f94 /g4f/gui/server/app.py
parentAdd export / import conversations (diff)
downloadgpt4free-8cc6000ffbf4e12bf6c1d5e5878d376e36857ec0.tar
gpt4free-8cc6000ffbf4e12bf6c1d5e5878d376e36857ec0.tar.gz
gpt4free-8cc6000ffbf4e12bf6c1d5e5878d376e36857ec0.tar.bz2
gpt4free-8cc6000ffbf4e12bf6c1d5e5878d376e36857ec0.tar.lz
gpt4free-8cc6000ffbf4e12bf6c1d5e5878d376e36857ec0.tar.xz
gpt4free-8cc6000ffbf4e12bf6c1d5e5878d376e36857ec0.tar.zst
gpt4free-8cc6000ffbf4e12bf6c1d5e5878d376e36857ec0.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..d9e25ca1 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/html")
+else:
+ template_folder = "./../client/html"
+
+app = Flask(__name__, template_folder=template_folder) \ No newline at end of file