Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
|
|
28 |
}
|
29 |
|
30 |
-
model = genai.GenerativeModel(
|
31 |
-
|
|
|
|
|
|
|
|
|
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():
|