Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -25,6 +25,9 @@ genai.configure(api_key=os.getenv("GOOGLE_API_KEY"))
|
|
| 25 |
model = genai.GenerativeModel("gemini-2.0-flash")
|
| 26 |
import firebase_admin
|
| 27 |
from firebase_admin import credentials
|
|
|
|
|
|
|
|
|
|
| 28 |
|
| 29 |
# cred = credentials.Certificate("/content/ir-502e5-firebase-adminsdk-3der0-0145a61d7a.json")
|
| 30 |
# firebase_admin.initialize_app(cred)
|
|
@@ -40,10 +43,9 @@ app.add_middleware(
|
|
| 40 |
)
|
| 41 |
def generate_df():
|
| 42 |
data = []
|
| 43 |
-
|
| 44 |
-
cred_dict = json.loads(cred_dic)
|
| 45 |
|
| 46 |
-
firebase_admin.initialize_app(
|
| 47 |
db = firestore.client()
|
| 48 |
docs = db.collection("test_results").get()
|
| 49 |
for doc in docs:
|
|
|
|
| 25 |
model = genai.GenerativeModel("gemini-2.0-flash")
|
| 26 |
import firebase_admin
|
| 27 |
from firebase_admin import credentials
|
| 28 |
+
cred_dic = os.getenv("Firebase_cred")
|
| 29 |
+
|
| 30 |
+
cred_dict = json.loads(cred_dic)
|
| 31 |
|
| 32 |
# cred = credentials.Certificate("/content/ir-502e5-firebase-adminsdk-3der0-0145a61d7a.json")
|
| 33 |
# firebase_admin.initialize_app(cred)
|
|
|
|
| 43 |
)
|
| 44 |
def generate_df():
|
| 45 |
data = []
|
| 46 |
+
cred = credentials.Certificate(cred_dict)
|
|
|
|
| 47 |
|
| 48 |
+
firebase_admin.initialize_app(cred)
|
| 49 |
db = firestore.client()
|
| 50 |
docs = db.collection("test_results").get()
|
| 51 |
for doc in docs:
|