Paul Ke commited on
Commit
49d51ea
·
verified ·
1 Parent(s): ad4f502

Update streamlit_app.py

Browse files
Files changed (1) hide show
  1. streamlit_app.py +6 -5
streamlit_app.py CHANGED
@@ -57,17 +57,18 @@ def _remove_all_videos():
57
  except FileNotFoundError:
58
  print("Couldn't delete file:", video)
59
 
 
60
  #API KEY
61
- API_KEY = st.sidebar.text_input("Google API Key", "AIzaSyB2uDj6IeuNszSuk80feW-eBgpIDH0WFSY", type="password")
62
- if API_KEY:
63
  genai.configure(api_key=API_KEY)
64
 
65
  #Gemini Model
66
- model_id = st.sidebar.text_input("Gemini Model", "gemini-2.0-flash-exp")
67
- safety_settings = [ { "category": "HARM_CATEGORY_HARASSMENT", "threshold": "BLOCK_NONE" }, { "category": "HARM_CATEGORY_HATE_SPEECH", "threshold": "BLOCK_NONE" }, { "category": "HARM_CATEGORY_SEXUALLY_EXPLICIT", "threshold": "BLOCK_NONE" }, { "category": "HARM_CATEGORY_DANGEROUS_CONTENT", "threshold": "BLOCK_NONE" }, ]
68
 
69
  # Analysis prompt
70
- analysis_prompt = st.sidebar.text_area("Enter analysis")
71
 
72
  @st.cache_resource
73
  def initialize_agent():
 
57
  except FileNotFoundError:
58
  print("Couldn't delete file:", video)
59
 
60
+ with st.sidebar.expander("Options", expanded=False):
61
  #API KEY
62
+ API_KEY = st.sidebar.text_input("Google API Key", "AIzaSyB2uDj6IeuNszSuk80feW-eBgpIDH0WFSY")
63
+ if API_KEY:
64
  genai.configure(api_key=API_KEY)
65
 
66
  #Gemini Model
67
+ model_id = st.sidebar.text_input("Gemini Model", "gemini-2.0-flash-exp")
68
+ safety_settings = [ { "category": "HARM_CATEGORY_HARASSMENT", "threshold": "BLOCK_NONE" }, { "category": "HARM_CATEGORY_HATE_SPEECH", "threshold": "BLOCK_NONE" }, { "category": "HARM_CATEGORY_SEXUALLY_EXPLICIT", "threshold": "BLOCK_NONE" }, { "category": "HARM_CATEGORY_DANGEROUS_CONTENT", "threshold": "BLOCK_NONE" }, ]
69
 
70
  # Analysis prompt
71
+ analysis_prompt = st.sidebar.text_area("Enter analysis")
72
 
73
  @st.cache_resource
74
  def initialize_agent():