getapi commited on
Commit
e463f93
·
1 Parent(s): 729ab1c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -9
app.py CHANGED
@@ -25,12 +25,15 @@ safety_settings = [
25
  if "authenticated" not in st.session_state:
26
  st.session_state["authenticated"] = False
27
 
28
- password = st.text_input("пасскод", type="password") if not st.session_state["authenticated"] else ""
29
-
30
- if password == st.secrets["real_password"]:
31
- st.session_state["authenticated"] = True
32
- st.success("тебе позволено войти, хорошо")
33
-
 
 
 
34
  with st.sidebar:
35
  st.title("Gemini Pro")
36
 
@@ -88,6 +91,4 @@ if password == st.secrets["real_password"]:
88
  res_area.markdown(res_text)
89
 
90
  messages.append({"role": "model", "parts": [res_text]})
91
- else:
92
- if password:
93
- st.warning("неправильный пароль, увы...")
 
25
  if "authenticated" not in st.session_state:
26
  st.session_state["authenticated"] = False
27
 
28
+ if not st.session_state["authenticated"]:
29
+ password = st.text_input("пасскод", type="password")
30
+
31
+ if password == st.secrets["real_password"]:
32
+ st.session_state["authenticated"] = True
33
+ st.success("успех")
34
+ elif password:
35
+ st.warning("неудача")
36
+ else:
37
  with st.sidebar:
38
  st.title("Gemini Pro")
39
 
 
91
  res_area.markdown(res_text)
92
 
93
  messages.append({"role": "model", "parts": [res_text]})
94
+