Spaces:
Runtime error
Runtime error
Commit
·
ccf48ce
1
Parent(s):
665ff61
Update app.py
Browse files
app.py
CHANGED
@@ -15,7 +15,24 @@ generation_config = genai.GenerationConfig(
|
|
15 |
max_output_tokens=3000
|
16 |
)
|
17 |
|
18 |
-
safety_settings = [
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
|
20 |
if 'chat_history' not in st.session_state:
|
21 |
st.session_state['chat_history'] = []
|
|
|
15 |
max_output_tokens=3000
|
16 |
)
|
17 |
|
18 |
+
safety_settings = SAFETY_SETTINGS = [
|
19 |
+
{
|
20 |
+
"category": "HARM_CATEGORY_DANGEROUS_CONTENT",
|
21 |
+
"threshold": "BLOCK_NONE",
|
22 |
+
},
|
23 |
+
{
|
24 |
+
"category": "HARM_CATEGORY_SEXUALLY_EXPLICIT",
|
25 |
+
"threshold": "BLOCK_NONE",
|
26 |
+
},
|
27 |
+
{
|
28 |
+
"category": "HARM_CATEGORY_HATE_SPEECH",
|
29 |
+
"threshold": "BLOCK_NONE",
|
30 |
+
},
|
31 |
+
{
|
32 |
+
"category": "HARM_CATEGORY_HARASSMENT",
|
33 |
+
"threshold": "BLOCK_NONE",
|
34 |
+
},
|
35 |
+
]
|
36 |
|
37 |
if 'chat_history' not in st.session_state:
|
38 |
st.session_state['chat_history'] = []
|