Spaces:
Runtime error
Runtime error
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)) |