Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -37,12 +37,10 @@ safety_settings = {
|
|
37 |
HarmCategory.HARM_CATEGORY_DANGEROUS_CONTENT: HarmBlockThreshold.BLOCK_LOW_AND_ABOVE,
|
38 |
}
|
39 |
|
40 |
-
prompt = """
|
41 |
-
Analyze this text for any instances of gender-based discrimination and provide tips
|
42 |
-
"""
|
43 |
|
44 |
-
|
45 |
-
|
|
|
46 |
|
47 |
|
48 |
# Prompt the model to generate content
|
@@ -54,6 +52,7 @@ response = example_model.generate_content(
|
|
54 |
# Function to analyze text
|
55 |
def analyze_text(text):
|
56 |
prompt = f"Analyze this text for any instances of gender-based discrimination and provide tips{text}"
|
|
|
57 |
response
|
58 |
return response.text if response else "No response generated."
|
59 |
|
|
|
37 |
HarmCategory.HARM_CATEGORY_DANGEROUS_CONTENT: HarmBlockThreshold.BLOCK_LOW_AND_ABOVE,
|
38 |
}
|
39 |
|
|
|
|
|
|
|
40 |
|
41 |
+
|
42 |
+
|
43 |
+
|
44 |
|
45 |
|
46 |
# Prompt the model to generate content
|
|
|
52 |
# Function to analyze text
|
53 |
def analyze_text(text):
|
54 |
prompt = f"Analyze this text for any instances of gender-based discrimination and provide tips{text}"
|
55 |
+
contents=[prompt]
|
56 |
response
|
57 |
return response.text if response else "No response generated."
|
58 |
|