diff options
author | altaf-creator <dev@altafcreator.com> | 2025-07-06 11:52:25 +0800 |
---|---|---|
committer | altaf-creator <dev@altafcreator.com> | 2025-07-06 11:52:25 +0800 |
commit | 5470a3ae1dea979352d1285fb1d4c56f3497db11 (patch) | |
tree | e261fa0782e3a3e3a85f378996bdafaf316205c0 | |
parent | 4836803512465c1a7c23e21befdd4bbb20592cc0 (diff) |
stupid memain
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | backend/main.py | 7 |
2 files changed, 6 insertions, 2 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4be494d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +backend/.env diff --git a/backend/main.py b/backend/main.py index 6681d58..b576a3a 100644 --- a/backend/main.py +++ b/backend/main.py @@ -2,6 +2,10 @@ from google import genai from google.genai import types import flask import flask_cors +import os +import dotenv + +dotenv.load_dotenv(".env") app = flask.Flask(__name__) flask_cors.CORS(app) @@ -9,8 +13,7 @@ flask_cors.CORS(app) UPLOAD_FOLDER = "uploads" app.config['UPLOAD_FOLDER'] = UPLOAD_FOLDER -client = genai.Client(api_key="AIzaSyA-mA7v4xlbEAz80uKf3Dywpbeh9ZfpLMs") - +client = genai.Client(api_key=os.getenv("API_KEY")) @app.route("/yeah", methods=["POST"]) def yeah_flask(): |