Spaces:
Running
Running
# Set up the model configuration for content generation | |
generation_config = { | |
"temperature": 0.4, | |
"top_p": 1, | |
"top_k": 32, | |
"max_output_tokens": 1400, | |
"response_mime_type": "text/plain", | |
} | |
# Define safety settings for content generation | |
safety_settings = [ | |
{"category": f"HARM_CATEGORY_{category}", "threshold": "BLOCK_MEDIUM_AND_ABOVE"} | |
for category in [ | |
"HARASSMENT", | |
"HATE_SPEECH", | |
"SEXUALLY_EXPLICIT", | |
"DANGEROUS_CONTENT", | |
] | |
] | |
# Define the model name | |
model_name = "gemini-1.5-pro" | |