bstraehle commited on
Commit
b50ab7b
·
1 Parent(s): 7de5168

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -4
app.py CHANGED
@@ -12,7 +12,6 @@ credentials = json.loads(credentials)
12
  from google.oauth2 import service_account
13
 
14
  credentials = service_account.Credentials.from_service_account_info(credentials)
15
- print("###1")
16
 
17
  if credentials.expired:
18
  credentials.refresh(Request())
@@ -20,12 +19,10 @@ if credentials.expired:
20
  vertexai.init(project = project,
21
  location = "us-west1",
22
  credentials = credentials)
23
- print("###2")
24
 
25
- #from vertexai.language_models import TextGenerationModel
26
 
27
  #generation_model = TextGenerationModel.from_pretrained("text-bison@001")
28
- #print("###3")
29
 
30
  def invoke(prompt):
31
  return generation_model.predict(prompt = prompt).text
 
12
  from google.oauth2 import service_account
13
 
14
  credentials = service_account.Credentials.from_service_account_info(credentials)
 
15
 
16
  if credentials.expired:
17
  credentials.refresh(Request())
 
19
  vertexai.init(project = project,
20
  location = "us-west1",
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
  return generation_model.predict(prompt = prompt).text