diff options
Diffstat (limited to 'g4f/gui/server/app.py')
-rw-r--r-- | g4f/gui/server/app.py | 8 |
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 |