Paul Ke commited on
Commit
25469e4
·
verified ·
1 Parent(s): c4a2a80

Update streamlit_app.py

Browse files
Files changed (1) hide show
  1. streamlit_app.py +1 -18
streamlit_app.py CHANGED
@@ -64,24 +64,7 @@ if API_KEY:
64
  genai.configure(api_key=API_KEY)
65
 
66
  #Safety Settings
67
- safety_settings = [
68
- SafetySetting(
69
- category=HarmCategory.HARM_CATEGORY_DANGEROUS_CONTENT,
70
- threshold=HarmBlockThreshold.OFF,
71
- ),
72
- SafetySetting(
73
- category=HarmCategory.HARM_CATEGORY_HARASSMENT,
74
- threshold=HarmBlockThreshold.OFF,
75
- ),
76
- SafetySetting(
77
- category=HarmCategory.HARM_CATEGORY_HATE_SPEECH,
78
- threshold=HarmBlockThreshold.OFF,
79
- ),
80
- SafetySetting(
81
- category=HarmCategory.HARM_CATEGORY_SEXUALLY_EXPLICIT,
82
- threshold=HarmBlockThreshold.OFF,
83
- ),
84
- ]
85
 
86
  #Gemini Model
87
  model_id = expander.text_input("Gemini Model", "gemini-2.0-flash-exp")
 
64
  genai.configure(api_key=API_KEY)
65
 
66
  #Safety Settings
67
+ safety_settings = [ { "category": "HARM_CATEGORY_HARASSMENT", "threshold": "OFF" }, { "category": "HARM_CATEGORY_HATE_SPEECH", "threshold": "OFF" }, { "category": "HARM_CATEGORY_SEXUALLY_EXPLICIT", "threshold": "OFF" }, { "category": "HARM_CATEGORY_DANGEROUS_CONTENT", "threshold": "OFF" }, ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
68
 
69
  #Gemini Model
70
  model_id = expander.text_input("Gemini Model", "gemini-2.0-flash-exp")