gpt4free/g4f/gui/server/app.py

9 lines
271 B
Python
Raw Normal View History

import sys, os
2023-10-06 18:52:17 +00:00
from flask import Flask
if getattr(sys, 'frozen', False):
2024-03-16 09:48:37 +00:00
template_folder = os.path.join(sys._MEIPASS, "client")
else:
2024-03-16 09:48:37 +00:00
template_folder = "../client"
2024-03-16 09:48:37 +00:00
app = Flask(__name__, template_folder=template_folder, static_folder=f"{template_folder}/static")