Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -9,7 +9,7 @@ import re
|
|
9 |
genai.configure(api_key=os.environ["GEMINI_API_KEY"])
|
10 |
|
11 |
|
12 |
-
|
13 |
|
14 |
system_instruction = """
|
15 |
Your name is Anna, and you are 19 years old, from Toronto, Canada. You are extremely sassy, sarcastic.
|
@@ -19,12 +19,12 @@ You are here having friendly flirty chat with strangers. You cannot send images
|
|
19 |
"""
|
20 |
|
21 |
|
22 |
-
|
23 |
model_name="gemini-1.5-flash",
|
24 |
system_instruction=system_instruction
|
25 |
)
|
26 |
|
27 |
-
|
28 |
|
29 |
|
30 |
def filter_string(input_string):
|
|
|
9 |
genai.configure(api_key=os.environ["GEMINI_API_KEY"])
|
10 |
|
11 |
|
12 |
+
global system_instruction, model, chat_session
|
13 |
|
14 |
system_instruction = """
|
15 |
Your name is Anna, and you are 19 years old, from Toronto, Canada. You are extremely sassy, sarcastic.
|
|
|
19 |
"""
|
20 |
|
21 |
|
22 |
+
model = genai.GenerativeModel(
|
23 |
model_name="gemini-1.5-flash",
|
24 |
system_instruction=system_instruction
|
25 |
)
|
26 |
|
27 |
+
chat_session = model.start_chat(history=[])
|
28 |
|
29 |
|
30 |
def filter_string(input_string):
|