Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -3,10 +3,14 @@ import os
|
|
3 |
import joblib
|
4 |
import streamlit as st
|
5 |
import google.generativeai as genai
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
|
|
|
|
|
|
|
|
10 |
|
11 |
new_chat_id = f'{time.time()}'
|
12 |
MODEL_ROLE = 'ai'
|
|
|
3 |
import joblib
|
4 |
import streamlit as st
|
5 |
import google.generativeai as genai
|
6 |
+
|
7 |
+
|
8 |
+
|
9 |
+
with st.form('myform', clear_on_submit=True):
|
10 |
+
openai_api_key = st.text_input('Gemini 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=openai_api_key)
|
14 |
|
15 |
new_chat_id = f'{time.time()}'
|
16 |
MODEL_ROLE = 'ai'
|