sgongora27 commited on
Commit
f404d37
verified
1 Parent(s): 53b79ac

Update models.py

Browse files
Files changed (1) hide show
  1. models.py +2 -1
models.py CHANGED
@@ -1,6 +1,7 @@
1
  """Load models to use them as a narrator and a common-sense oracle in the PAYADOR pipeline."""
2
  import google.generativeai as genai
3
  import requests
 
4
 
5
 
6
  class GeminiModel():
@@ -28,7 +29,7 @@ class GeminiModel():
28
  "threshold": "BLOCK_NONE",
29
  },
30
  ]
31
- genai.configure(api_key=get_api_key(api_key_file))
32
  self.model = genai.GenerativeModel(model_name)
33
 
34
  def prompt_model(self,prompt: str) -> str:
 
1
  """Load models to use them as a narrator and a common-sense oracle in the PAYADOR pipeline."""
2
  import google.generativeai as genai
3
  import requests
4
+ import os
5
 
6
 
7
  class GeminiModel():
 
29
  "threshold": "BLOCK_NONE",
30
  },
31
  ]
32
+ genai.configure(api_key=os.getenv(api_key_file))
33
  self.model = genai.GenerativeModel(model_name)
34
 
35
  def prompt_model(self,prompt: str) -> str: