File size: 911 Bytes
2b4408c
b9fa07c
2b4408c
 
b9fa07c
2b4408c
b9fa07c
2b4408c
b9fa07c
 
 
 
 
2b4408c
 
 
b9fa07c
 
2b4408c
 
b9fa07c
 
2b4408c
b9fa07c
2b4408c
b9fa07c
 
 
 
2b4408c
b9fa07c
2b4408c
b9fa07c
 
2b4408c
b9fa07c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import streamlit as st
import model_class


# import streamlit as st

col1, col2 = st.columns(2)

with col1:
#    st.header("A cat")
#    st.image("https://static.streamlit.io/examples/cat.jpg")
    # text_box
    gptkey = st.text_input(label='Enter GPT KEY',placeholder="Enter GPT-API-KEY",label_visibility="collapsed")



with col2:
    pineconekey = st.text_input(label='Enter PINECONE KEY',placeholder="Enter Pinecone API-KEY",label_visibility="collapsed")


# text_box
# query = st.text_input(label='Enter Query',placeholder="Enter Query",label_visibility="collapsed")

query = st.text_area(label='Enter Query',placeholder="Enter Query",height=200)

if st.button('Submit'):
# if query:
    model_class.model_obj.setAPIKEY(gptkey, pineconekey)
    model_class.model_obj.initializer()

    resp = model_class.model_obj.get_response(query)

    # for i in resp:
        # st.write(i)

    st.write(eval(resp))