Manas281 commited on
Commit
b03fa65
·
verified ·
1 Parent(s): 3bdf19f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -19,9 +19,7 @@ import pandas as pd
19
  import json
20
  from io import BytesIO
21
  import tempfile
22
- from google.auth.credentials import AnonymousCredentials
23
- from google.api_core.client_options import ClientOptions
24
- from google.generative_ai import GenerativeAIClient
25
 
26
 
27
 
@@ -73,7 +71,7 @@ embeddings = HuggingFaceEmbeddings(model_name="all-MiniLM-L6-v2")
73
  # API keys
74
  api_key = os.getenv('API_KEY')
75
  GEMINI_API_KEY = os.getenv('GEMINI_API')
76
- genai.configure(api_key=GEMINI_API_KEY)
77
 
78
  client = GenerativeAIClient(credentials=AnonymousCredentials(), client_options=ClientOptions(api_key=GEMINI_API_KEY))
79
 
 
19
  import json
20
  from io import BytesIO
21
  import tempfile
22
+
 
 
23
 
24
 
25
 
 
71
  # API keys
72
  api_key = os.getenv('API_KEY')
73
  GEMINI_API_KEY = os.getenv('GEMINI_API')
74
+ os.environ["GOOGLE_API_KEY"] =GEMINI_API_KEY
75
 
76
  client = GenerativeAIClient(credentials=AnonymousCredentials(), client_options=ClientOptions(api_key=GEMINI_API_KEY))
77