Spaces:
Paused
Paused
Fixed typos
Browse files- Tabs/Gemini_Chabot_Nightly.py +17 -17
- app.py +4 -4
Tabs/Gemini_Chabot_Nightly.py
CHANGED
@@ -25,23 +25,23 @@ genai.configure(api_key=GEMINI_API_KEY_NIGHTLY)
|
|
25 |
model = genai.GenerativeModel(
|
26 |
model_name,
|
27 |
safety_settings=[
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
generation_config={
|
46 |
"temperature": 1,
|
47 |
"top_p": 0.95,
|
|
|
25 |
model = genai.GenerativeModel(
|
26 |
model_name,
|
27 |
safety_settings=[
|
28 |
+
{
|
29 |
+
"category": "HARM_CATEGORY_HARASSMENT",
|
30 |
+
"threshold": "BLOCK_NONE"
|
31 |
+
},
|
32 |
+
{
|
33 |
+
"category": "HARM_CATEGORY_HATE_SPEECH",
|
34 |
+
"threshold": "BLOCK_NONE"
|
35 |
+
},
|
36 |
+
{
|
37 |
+
"category": "HARM_CATEGORY_SEXUALLY_EXPLICIT",
|
38 |
+
"threshold": "BLOCK_NONE"
|
39 |
+
},
|
40 |
+
{
|
41 |
+
"category": "HARM_CATEGORY_DANGEROUS_CONTENT",
|
42 |
+
"threshold": "BLOCK_NONE"
|
43 |
+
}
|
44 |
+
],
|
45 |
generation_config={
|
46 |
"temperature": 1,
|
47 |
"top_p": 0.95,
|
app.py
CHANGED
@@ -91,19 +91,19 @@ def bot(
|
|
91 |
model_name,
|
92 |
safety_settings=[
|
93 |
{
|
94 |
-
"
|
95 |
"threshold": "BLOCK_NONE"
|
96 |
},
|
97 |
{
|
98 |
-
"
|
99 |
"threshold": "BLOCK_NONE"
|
100 |
},
|
101 |
{
|
102 |
-
"
|
103 |
"threshold": "BLOCK_NONE"
|
104 |
},
|
105 |
{
|
106 |
-
"
|
107 |
"threshold": "BLOCK_NONE"
|
108 |
}
|
109 |
],
|
|
|
91 |
model_name,
|
92 |
safety_settings=[
|
93 |
{
|
94 |
+
"category": "HARM_CATEGORY_HARASSMENT",
|
95 |
"threshold": "BLOCK_NONE"
|
96 |
},
|
97 |
{
|
98 |
+
"category": "HARM_CATEGORY_HATE_SPEECH",
|
99 |
"threshold": "BLOCK_NONE"
|
100 |
},
|
101 |
{
|
102 |
+
"category": "HARM_CATEGORY_SEXUALLY_EXPLICIT",
|
103 |
"threshold": "BLOCK_NONE"
|
104 |
},
|
105 |
{
|
106 |
+
"category": "HARM_CATEGORY_DANGEROUS_CONTENT",
|
107 |
"threshold": "BLOCK_NONE"
|
108 |
}
|
109 |
],
|