Update app.py
Browse files
app.py
CHANGED
@@ -6,18 +6,19 @@ _ = load_dotenv(find_dotenv())
|
|
6 |
|
7 |
from vertexai.language_models import TextGenerationModel
|
8 |
|
9 |
-
|
10 |
-
#project = os.environ["PROJECT"]
|
11 |
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
|
17 |
vertexai.init(project = project,
|
18 |
location = "us-west1",
|
19 |
credentials = credentials)
|
20 |
|
|
|
|
|
21 |
generation_model = TextGenerationModel.from_pretrained("text-bison@001")
|
22 |
|
23 |
def invoke(prompt):
|
|
|
6 |
|
7 |
from vertexai.language_models import TextGenerationModel
|
8 |
|
9 |
+
print(1)
|
|
|
10 |
|
11 |
+
credentials = os.environ["CREDENTIALS"]
|
12 |
+
project = os.environ["PROJECT"]
|
13 |
+
|
14 |
+
print(2)
|
15 |
|
16 |
vertexai.init(project = project,
|
17 |
location = "us-west1",
|
18 |
credentials = credentials)
|
19 |
|
20 |
+
print(3)
|
21 |
+
|
22 |
generation_model = TextGenerationModel.from_pretrained("text-bison@001")
|
23 |
|
24 |
def invoke(prompt):
|