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

Update streamlit_app.py

Browse files
Files changed (1) hide show
  1. streamlit_app.py +6 -6
streamlit_app.py CHANGED
@@ -57,18 +57,18 @@ def _remove_all_videos():
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():
 
57
  except FileNotFoundError:
58
  print("Couldn't delete file:", video)
59
 
60
+ expander = st.sidebar.expander("Options", expanded=False)
61
  #API KEY
62
+ API_KEY = expander.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 = expander.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 = expander.text_area("Enter analysis")
72
 
73
  @st.cache_resource
74
  def initialize_agent():