Update app.py
Browse files
app.py
CHANGED
@@ -10,12 +10,11 @@ import time
|
|
10 |
|
11 |
api_key = os.getenv("GOOGLE_API_KEY")
|
12 |
|
13 |
-
embeddings = GoogleGenerativeAIEmbeddings(model="models/embedding-001", google_api_key=api_key)
|
14 |
-
|
15 |
# Configure Gemini API
|
16 |
genai.configure()
|
17 |
model = genai.GenerativeModel("models/gemini-pro") # Use a more stable model
|
18 |
-
embeddings =
|
|
|
19 |
def calculate_bmi(weight, height):
|
20 |
"""Calculates BMI."""
|
21 |
try:
|
|
|
10 |
|
11 |
api_key = os.getenv("GOOGLE_API_KEY")
|
12 |
|
|
|
|
|
13 |
# Configure Gemini API
|
14 |
genai.configure()
|
15 |
model = genai.GenerativeModel("models/gemini-pro") # Use a more stable model
|
16 |
+
embeddings = GoogleGenerativeAIEmbeddings(model="models/embedding-001", google_api_key=api_key)
|
17 |
+
|
18 |
def calculate_bmi(weight, height):
|
19 |
"""Calculates BMI."""
|
20 |
try:
|