adarsh-maurya commited on
Commit
3c4e371
·
verified ·
1 Parent(s): 1453296

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -124,7 +124,7 @@ def detect_target_language(prompt):
124
  firebase_config = {
125
  "apiKey": os.environ["FIREBASE_API_KEY"],
126
  "authDomain": os.environ["FIREBASE_AUTH_DOMAIN"],
127
- "databaseURL": os.environ["FIREBASE_DATABASE_URL"],
128
  "projectId": os.environ["FIREBASE_PROJECT_ID"],
129
  "storageBucket": os.environ["FIREBASE_STORAGE_BUCKET"],
130
  "messagingSenderId": os.environ["FIREBASE_MESSAGING_SENDER_ID"],
@@ -138,10 +138,10 @@ auth = firebase.auth()
138
  def initialize_firebase():
139
  try:
140
  if not firebase_admin._apps:
141
- cred_path = os.environ["FIREBASE_CRED_PATH"] # example: "apna5.json"
142
  cred = credentials.Certificate(cred_path)
143
  firebase_app = initialize_app(cred, {
144
- 'databaseURL': os.environ["FIREBASE_DATABASE_URL"]
145
  })
146
  except Exception as e:
147
  st.error(f"Firebase initialization error: {str(e)}")
 
124
  firebase_config = {
125
  "apiKey": os.environ["FIREBASE_API_KEY"],
126
  "authDomain": os.environ["FIREBASE_AUTH_DOMAIN"],
127
+ "databaseURL": os.environ["FIREBASE_DATABASE_URL"], # Updated to match your variable
128
  "projectId": os.environ["FIREBASE_PROJECT_ID"],
129
  "storageBucket": os.environ["FIREBASE_STORAGE_BUCKET"],
130
  "messagingSenderId": os.environ["FIREBASE_MESSAGING_SENDER_ID"],
 
138
  def initialize_firebase():
139
  try:
140
  if not firebase_admin._apps:
141
+ cred_path = os.environ["FIREBASE_CREDS_JSON"] # example: "apna5.json"
142
  cred = credentials.Certificate(cred_path)
143
  firebase_app = initialize_app(cred, {
144
+ 'databaseURL': os.environ["FIREBASE_DB_URL"]
145
  })
146
  except Exception as e:
147
  st.error(f"Firebase initialization error: {str(e)}")