Spaces:
Build error
Build error
legaltextai
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -29,7 +29,7 @@ def extract_text_from_api(query):
|
|
29 |
|
30 |
@st.cache_data(ttl=3600)
|
31 |
def get_summary(text):
|
32 |
-
model = genai.GenerativeModel('gemini-1.5-
|
33 |
safety_settings = {
|
34 |
'HATE': 'BLOCK_NONE',
|
35 |
'HARASSMENT': 'BLOCK_NONE',
|
@@ -71,7 +71,7 @@ with tab1:
|
|
71 |
if text:
|
72 |
#st.write(text)
|
73 |
summary = get_summary(text)
|
74 |
-
|
75 |
if summary:
|
76 |
st.write(summary.text)
|
77 |
else:
|
|
|
29 |
|
30 |
@st.cache_data(ttl=3600)
|
31 |
def get_summary(text):
|
32 |
+
model = genai.GenerativeModel('gemini-1.5-flash', generation_config=generation_config,
|
33 |
safety_settings = {
|
34 |
'HATE': 'BLOCK_NONE',
|
35 |
'HARASSMENT': 'BLOCK_NONE',
|
|
|
71 |
if text:
|
72 |
#st.write(text)
|
73 |
summary = get_summary(text)
|
74 |
+
st.write(summary.candidates[0].safety_ratings)
|
75 |
if summary:
|
76 |
st.write(summary.text)
|
77 |
else:
|