Spaces:
Runtime error
Runtime error
Download app.py from vishal0501/ICD-DEMO: direct link, hf CLI and curl.
- Browser
- Download file 911 Bytes
-
https://huggingface.co/spaces/vishal0501/ICD-DEMO/resolve/main/app.py
- Command line
-
hf download hf://spaces/vishal0501/ICD-DEMO/app.py
-
curl -L -o app.py https://huggingface.co/spaces/vishal0501/ICD-DEMO/resolve/main/app.py
911 Bytes
| 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)) |