Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,6 +4,10 @@ import sqlite3
|
|
| 4 |
import google.generativeai as genai
|
| 5 |
# import pyttsx3
|
| 6 |
import pyperclip
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
|
| 8 |
|
| 9 |
|
|
@@ -128,7 +132,7 @@ def main():
|
|
| 128 |
else:
|
| 129 |
try:
|
| 130 |
# GEMINI Replace with your Gemini Api key
|
| 131 |
-
GOOGLE_API_KEY =
|
| 132 |
genai.configure(api_key=GOOGLE_API_KEY)
|
| 133 |
model = genai.GenerativeModel(selected_model)
|
| 134 |
prompt = user_input
|
|
|
|
| 4 |
import google.generativeai as genai
|
| 5 |
# import pyttsx3
|
| 6 |
import pyperclip
|
| 7 |
+
import os
|
| 8 |
+
|
| 9 |
+
api_key = os.getenv("Gemini_api")
|
| 10 |
+
|
| 11 |
|
| 12 |
|
| 13 |
|
|
|
|
| 132 |
else:
|
| 133 |
try:
|
| 134 |
# GEMINI Replace with your Gemini Api key
|
| 135 |
+
GOOGLE_API_KEY = api_key
|
| 136 |
genai.configure(api_key=GOOGLE_API_KEY)
|
| 137 |
model = genai.GenerativeModel(selected_model)
|
| 138 |
prompt = user_input
|