Spaces:
Sleeping
Sleeping
Commit
·
07b2aa1
1
Parent(s):
6a38d97
Fixed Indents
Browse files- __pycache__/utils.cpython-312.pyc +0 -0
- utils.py +7 -7
__pycache__/utils.cpython-312.pyc
CHANGED
|
Binary files a/__pycache__/utils.cpython-312.pyc and b/__pycache__/utils.cpython-312.pyc differ
|
|
|
utils.py
CHANGED
|
@@ -26,13 +26,13 @@ from langchain.text_splitter import RecursiveCharacterTextSplitter
|
|
| 26 |
|
| 27 |
|
| 28 |
def authenticate():
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
|
| 37 |
|
| 38 |
def load_documents_gradio(uploaded_files):
|
|
|
|
| 26 |
|
| 27 |
|
| 28 |
def authenticate():
|
| 29 |
+
"""Authenticates with the Google Generative AI API using an API key."""
|
| 30 |
+
api_key = os.environ.get("GOOGLE_API_KEY")
|
| 31 |
+
if not api_key:
|
| 32 |
+
api_key = getpass.getpass("Enter your API Key: ")
|
| 33 |
+
|
| 34 |
+
client = genai.Client(api_key=api_key)
|
| 35 |
+
return client
|
| 36 |
|
| 37 |
|
| 38 |
def load_documents_gradio(uploaded_files):
|