Commit
β’
051d77a
1
Parent(s):
2f94511
Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,10 @@
|
|
1 |
import streamlit as st
|
2 |
from chatnoir_api.v1 import search
|
3 |
|
|
|
|
|
|
|
|
|
4 |
st.set_page_config(
|
5 |
page_title="ChatNoir",
|
6 |
page_icon="π",
|
@@ -45,4 +49,5 @@ with st.expander("π About", expanded=False):
|
|
45 |
st.markdown("")
|
46 |
|
47 |
if button_clicked:
|
48 |
-
|
|
|
|
1 |
import streamlit as st
|
2 |
from chatnoir_api.v1 import search
|
3 |
|
4 |
+
@st.cache()
|
5 |
+
def search_chat_noir(key, search_query):
|
6 |
+
return search(key=key, search_query=search_query)
|
7 |
+
|
8 |
st.set_page_config(
|
9 |
page_title="ChatNoir",
|
10 |
page_icon="π",
|
|
|
49 |
st.markdown("")
|
50 |
|
51 |
if button_clicked:
|
52 |
+
search_results = search_chat_noir(st.secrets["key"], search_query)
|
53 |
+
st.write(search_results[0])
|