gpt4free/g4f/gui/server/app.py

9 lines
271 B
Python
Raw Normal View History

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