Update app.py
Browse files
app.py
CHANGED
|
@@ -1,5 +1,6 @@
|
|
| 1 |
import google.generativeai as genai
|
| 2 |
import gradio as gr
|
|
|
|
| 3 |
|
| 4 |
def carbonFootPrintAI(monthly_oil_bill: int,
|
| 5 |
monthly_gas_bill: int,
|
|
@@ -9,8 +10,10 @@ def carbonFootPrintAI(monthly_oil_bill: int,
|
|
| 9 |
number_of_flights_in_past_year_more_or_equal_4hours: int,
|
| 10 |
recycle_newspaper=False,
|
| 11 |
recycle_aluminium_and_tin=False):
|
|
|
|
|
|
|
| 12 |
|
| 13 |
-
genai.configure(api_key=
|
| 14 |
|
| 15 |
model = genai.GenerativeModel("gemini-pro")
|
| 16 |
|
|
|
|
| 1 |
import google.generativeai as genai
|
| 2 |
import gradio as gr
|
| 3 |
+
import os
|
| 4 |
|
| 5 |
def carbonFootPrintAI(monthly_oil_bill: int,
|
| 6 |
monthly_gas_bill: int,
|
|
|
|
| 10 |
number_of_flights_in_past_year_more_or_equal_4hours: int,
|
| 11 |
recycle_newspaper=False,
|
| 12 |
recycle_aluminium_and_tin=False):
|
| 13 |
+
|
| 14 |
+
api_key = os.getenv(GEMINI_API_KEY)
|
| 15 |
|
| 16 |
+
genai.configure(api_key=api_key)
|
| 17 |
|
| 18 |
model = genai.GenerativeModel("gemini-pro")
|
| 19 |
|