Update app.py
Browse files
app.py
CHANGED
@@ -4,11 +4,8 @@ import random
|
|
4 |
import google.generativeai as genai
|
5 |
|
6 |
# Set your GEMINI API key
|
7 |
-
api_key = os.getenv("GEMINI_API_KEY")
|
8 |
-
genai.
|
9 |
-
system_message = os.getenv("SYSTM_MSG")
|
10 |
-
|
11 |
-
model = genai.GenerativeModel(model_name="gemini-1.5-flash", system_instruction = system_message)
|
12 |
# generationConfig = GenerationConfig(max_output_tokens=2048, temperature=0.7, top_p=1, top_k=32)
|
13 |
# safetySettings = [
|
14 |
# {
|
|
|
4 |
import google.generativeai as genai
|
5 |
|
6 |
# Set your GEMINI API key
|
7 |
+
genai.configure(api_key = os.getenv("GEMINI_API_KEY"))
|
8 |
+
model = genai.GenerativeModel(model_name="gemini-1.5-flash", system_instruction = os.getenv("SYSTM_MSG"))
|
|
|
|
|
|
|
9 |
# generationConfig = GenerationConfig(max_output_tokens=2048, temperature=0.7, top_p=1, top_k=32)
|
10 |
# safetySettings = [
|
11 |
# {
|