bstraehle commited on
Commit
edf6a1c
·
verified ·
1 Parent(s): bf362b5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -24,7 +24,7 @@ if credentials.expired:
24
  credentials.refresh(Request())
25
 
26
  vertexai.init(location = "us-central1",
27
- credentials = "BringYourOwn", #credentials,
28
  project = project
29
  )
30
 
@@ -35,6 +35,8 @@ def invoke(prompt):
35
  if (prompt == ""):
36
  raise gr.Error("Prompt is required.")
37
 
 
 
38
  completion = ""
39
 
40
  try:
@@ -55,7 +57,7 @@ def invoke(prompt):
55
  return completion
56
 
57
  description = """<a href='https://www.gradio.app/'>Gradio</a> UI using the <a href='https://cloud.google.com/vertex-ai'>Google Vertex AI</a> API
58
- with Gemini Pro model. Clone and bring your own credentials."""
59
 
60
  gr.close_all()
61
 
 
24
  credentials.refresh(Request())
25
 
26
  vertexai.init(location = "us-central1",
27
+ credentials = credentials,
28
  project = project
29
  )
30
 
 
35
  if (prompt == ""):
36
  raise gr.Error("Prompt is required.")
37
 
38
+ raise gr.Error("Clone and bring your own credentials.")
39
+
40
  completion = ""
41
 
42
  try:
 
57
  return completion
58
 
59
  description = """<a href='https://www.gradio.app/'>Gradio</a> UI using the <a href='https://cloud.google.com/vertex-ai'>Google Vertex AI</a> API
60
+ with Gemini Pro model."""
61
 
62
  gr.close_all()
63