Update models.py
Browse files
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=
|
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:
|