yasserrmd commited on
Commit
4a66cbe
1 Parent(s): ee63255

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -4,13 +4,14 @@ import joblib
4
  import streamlit as st
5
  import google.generativeai as genai
6
 
7
- query=''
8
 
9
  with st.form('myform', clear_on_submit=True):
10
- google_api_key = st.text_input('Google API Key', type='password', disabled=not (query))
11
- submitted = st.form_submit_button('Submit', disabled=not(query))
12
  if submitted:
13
  genai.configure(api_key=google_api_key)
 
14
 
15
  new_chat_id = f'{time.time()}'
16
  MODEL_ROLE = 'ai'
 
4
  import streamlit as st
5
  import google.generativeai as genai
6
 
7
+ disable=False
8
 
9
  with st.form('myform', clear_on_submit=True):
10
+ google_api_key = st.text_input('Google API Key', type='password', disabled=disable)
11
+ submitted = st.form_submit_button('Submit', disabled=disable)
12
  if submitted:
13
  genai.configure(api_key=google_api_key)
14
+ disable=True
15
 
16
  new_chat_id = f'{time.time()}'
17
  MODEL_ROLE = 'ai'