Update app.py
Browse files
app.py
CHANGED
@@ -17,15 +17,15 @@ if credentials.expired:
|
|
17 |
credentials.refresh(Request())
|
18 |
|
19 |
vertexai.init(project = project,
|
20 |
-
location = "us-
|
21 |
credentials = credentials)
|
22 |
|
23 |
from vertexai.language_models import TextGenerationModel
|
24 |
|
25 |
-
|
26 |
|
27 |
def invoke(prompt):
|
28 |
-
generation_model = TextGenerationModel.from_pretrained("text-bison@001")
|
29 |
return generation_model.predict(prompt = prompt).text
|
30 |
|
31 |
gr.close_all()
|
|
|
17 |
credentials.refresh(Request())
|
18 |
|
19 |
vertexai.init(project = project,
|
20 |
+
location = "us-central1",
|
21 |
credentials = credentials)
|
22 |
|
23 |
from vertexai.language_models import TextGenerationModel
|
24 |
|
25 |
+
generation_model = TextGenerationModel.from_pretrained("text-bison@001")
|
26 |
|
27 |
def invoke(prompt):
|
28 |
+
#generation_model = TextGenerationModel.from_pretrained("text-bison@001")
|
29 |
return generation_model.predict(prompt = prompt).text
|
30 |
|
31 |
gr.close_all()
|