Spaces:
Build error
Build error
Paul Ke commited on
Update streamlit_app.py
Browse files- streamlit_app.py +7 -1
streamlit_app.py
CHANGED
|
@@ -62,7 +62,13 @@ expander = st.sidebar.expander("Options", expanded=True)
|
|
| 62 |
API_KEY = expander.text_input("Google API Key", "AIzaSyB2uDj6IeuNszSuk80feW-eBgpIDH0WFSY")
|
| 63 |
if API_KEY:
|
| 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 |
|
|
|
|
| 62 |
API_KEY = expander.text_input("Google API Key", "AIzaSyB2uDj6IeuNszSuk80feW-eBgpIDH0WFSY")
|
| 63 |
if API_KEY:
|
| 64 |
genai.configure(api_key=API_KEY)
|
| 65 |
+
# Returns the "context window" for the model,
|
| 66 |
+
# which is the combined input and output token limits.
|
| 67 |
+
print(f"{model_info.input_token_limit=}")
|
| 68 |
+
print(f"{model_info.output_token_limit=}")
|
| 69 |
+
# ( input_token_limit=30720, output_token_limit=2048 )
|
| 70 |
+
# [END tokens_context_window]
|
| 71 |
+
|
| 72 |
#Safety Settings
|
| 73 |
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" }, ]
|
| 74 |
|