AdityaRatan commited on
Commit
fdaf769
·
verified ·
1 Parent(s): 51d2b4c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -6
app.py CHANGED
@@ -21,14 +21,19 @@ GEMINI_API_KEY = os.getenv("gemini_api")
21
 
22
  genai.configure(api_key=GEMINI_API_KEY)
23
  generation_config = {
24
- "temperature": 1,
25
- "top_p": 0.95,
26
- "top_k": 64,
27
- "max_output_tokens": 8192,
 
28
  }
29
 
30
- model = genai.GenerativeModel("gemini-pro", generation_config=generation_config)
31
- chat_model = genai.GenerativeModel("gemini-pro")
 
 
 
 
32
 
33
  # Create and save a simple model on first run
34
  def create_initial_model():
 
21
 
22
  genai.configure(api_key=GEMINI_API_KEY)
23
  generation_config = {
24
+ "temperature": 1,
25
+ "top_p": 0.95,
26
+ "top_k": 64,
27
+ "max_output_tokens": 8192,
28
+ "response_mime_type": "text/plain",
29
  }
30
 
31
+ model = genai.GenerativeModel(
32
+ model_name="gemini-2.0-pro-exp-02-05",
33
+ generation_config=generation_config,
34
+ )
35
+
36
+ chat_model = genai.GenerativeModel('"gemini-2.0-pro-exp-02-05"')
37
 
38
  # Create and save a simple model on first run
39
  def create_initial_model():