summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraltaf-creator <dev@altafcreator.com>2025-07-06 11:52:25 +0800
committeraltaf-creator <dev@altafcreator.com>2025-07-06 11:52:25 +0800
commit5470a3ae1dea979352d1285fb1d4c56f3497db11 (patch)
treee261fa0782e3a3e3a85f378996bdafaf316205c0
parent4836803512465c1a7c23e21befdd4bbb20592cc0 (diff)
stupid memain
-rw-r--r--.gitignore1
-rw-r--r--backend/main.py7
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():