rakesh-dvg commited on
Commit
ff92a2d
·
verified ·
1 Parent(s): df403a9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -0
app.py CHANGED
@@ -7,6 +7,22 @@ import pandas as pd
7
  from langchain_core.messages import HumanMessage
8
  from agent import build_graph
9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
 
11
 
12
  # (Keep Constants as is)
 
7
  from langchain_core.messages import HumanMessage
8
  from agent import build_graph
9
 
10
+ from dotenv import load_dotenv
11
+ import os
12
+
13
+ load_dotenv()
14
+
15
+ SUPABASE_URL = os.getenv("SUPABASE_URL")
16
+ SUPABASE_KEY = os.getenv("SUPABASE_KEY")
17
+
18
+ if not SUPABASE_KEY:
19
+ raise ValueError("SUPABASE_KEY is missing!")
20
+
21
+ # Now, import the agent module AFTER loading the env variables
22
+ import agent
23
+
24
+ # Pass the variables or client to agent functions/classes as needed
25
+ agent.init_supabase_client(SUPABASE_URL, SUPABASE_KEY)
26
 
27
 
28
  # (Keep Constants as is)