Paul Ke commited on
Commit
e89f4ce
·
verified ·
1 Parent(s): 3e44458

Update streamlit_app.py

Browse files
Files changed (1) hide show
  1. streamlit_app.py +6 -6
streamlit_app.py CHANGED
@@ -62,18 +62,18 @@ 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
- # 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
 
75
  #Gemini Model
76
  model_id = expander.text_input("Gemini Model", "gemini-2.0-flash-exp")
 
 
 
 
 
 
77
 
78
  # Analysis prompt
79
  analysis_prompt = expander.text_area("Enter analysis")
 
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
 
69
  #Gemini Model
70
  model_id = expander.text_input("Gemini Model", "gemini-2.0-flash-exp")
71
+ # Returns the "context window" for the model,
72
+ # which is the combined input and output token limits.
73
+ print(f"{model_id.input_token_limit=}")
74
+ print(f"{model_id.output_token_limit=}")
75
+ # ( input_token_limit=30720, output_token_limit=2048 )
76
+ # [END tokens_context_window]
77
 
78
  # Analysis prompt
79
  analysis_prompt = expander.text_area("Enter analysis")