Shrirang20 commited on
Commit
b37aed0
1 Parent(s): cb1f36f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -153,13 +153,15 @@ print(result[0].page_content)
153
  Result_with_score = faiss.similarity_search_with_score("what are the benefits of PM kisan yojna", k=3)
154
  Result_with_score[0]
155
 
156
- os.environ['GEMINI_API_KEY'] = userdata.get('GEMINI_API_KEY')
 
 
157
 
158
  import google.generativeai as genai
159
 
160
  def get_gemini_output(prompt, temperature=0.6):
161
 
162
- genai.configure(api_key= os.environ['GEMINI_API_KEY'])
163
  model = genai.GenerativeModel(model_name='gemini-pro')
164
  answer = model.generate_content(prompt,
165
  generation_config=genai.types.GenerationConfig(
 
153
  Result_with_score = faiss.similarity_search_with_score("what are the benefits of PM kisan yojna", k=3)
154
  Result_with_score[0]
155
 
156
+
157
+
158
+ gemini_api_key = os.getenv('GEMINI_API_KEY')
159
 
160
  import google.generativeai as genai
161
 
162
  def get_gemini_output(prompt, temperature=0.6):
163
 
164
+ genai.configure(api_key= gemini_api_key)
165
  model = genai.GenerativeModel(model_name='gemini-pro')
166
  answer = model.generate_content(prompt,
167
  generation_config=genai.types.GenerationConfig(