markytools commited on
Commit
21dfa70
·
1 Parent(s): 4970bec

added password lock

Browse files
Files changed (1) hide show
  1. app.py +10 -0
app.py CHANGED
@@ -26,6 +26,16 @@ if not OPEN_ROUTER_KEY:
26
  st.warning("Please enter your OpenRouter API Key to proceed.")
27
  st.stop()
28
 
 
 
 
 
 
 
 
 
 
 
29
  def call_openrouter(content: str) -> str:
30
  """Send a chat request to OpenRouter and return a safe string response."""
31
  try:
 
26
  st.warning("Please enter your OpenRouter API Key to proceed.")
27
  st.stop()
28
 
29
+ try:
30
+ pswdVal = st.experimental_get_query_params()['pwd'][0]
31
+ if pswdVal==st.secrets["PSWD"]:
32
+ isPswdValid = True
33
+ except:
34
+ pass
35
+
36
+ if not isPswdValid:
37
+ st.write("Invalid Password")
38
+
39
  def call_openrouter(content: str) -> str:
40
  """Send a chat request to OpenRouter and return a safe string response."""
41
  try: