bstraehle commited on
Commit
201c06f
·
verified ·
1 Parent(s): ef40a94

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -3
app.py CHANGED
@@ -9,7 +9,7 @@ project = os.environ["PROJECT"]
9
 
10
  config = {
11
  "max_output_tokens": 1000,
12
- "model": "gemini-1.5-pro-preview-0514",
13
  "temperature": 0.1,
14
  "top_k": 40,
15
  "top_p": 1.0,
@@ -35,7 +35,7 @@ def invoke(prompt):
35
  if not prompt:
36
  raise gr.Error("Prompt is required.")
37
 
38
- raise gr.Error("Please clone and bring your own credentials.")
39
 
40
  completion = ""
41
 
@@ -53,11 +53,15 @@ def invoke(prompt):
53
  completion = e
54
 
55
  raise gr.Error(e)
 
 
 
 
56
 
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> SDK
60
- with Gemini 1.5 Pro model."""
61
 
62
  gr.close_all()
63
 
 
9
 
10
  config = {
11
  "max_output_tokens": 1000,
12
+ "model": "gemini-2.5-pro-preview-03-25",
13
  "temperature": 0.1,
14
  "top_k": 40,
15
  "top_p": 1.0,
 
35
  if not prompt:
36
  raise gr.Error("Prompt is required.")
37
 
38
+ #raise gr.Error("Please clone and bring your own credentials.")
39
 
40
  completion = ""
41
 
 
53
  completion = e
54
 
55
  raise gr.Error(e)
56
+
57
+ print("===")
58
+ print(completion)
59
+ print("===")
60
 
61
  return completion
62
 
63
  description = """<a href='https://www.gradio.app/'>Gradio</a> UI using the <a href='https://cloud.google.com/vertex-ai'>Google Vertex AI</a> SDK
64
+ with Gemini 2.5 Pro model."""
65
 
66
  gr.close_all()
67