Spaces:
Running
Running
adding the Haystack logo
Browse files- .streamlit/config.toml +1 -5
- logo/haystack-logo-colored.png +0 -0
- utils/ui.py +10 -7
.streamlit/config.toml
CHANGED
@@ -1,7 +1,3 @@
|
|
1 |
[theme]
|
2 |
-
|
3 |
-
base = "dark"
|
4 |
-
backgroundColor="#2B2F54"
|
5 |
-
secondaryBackgroundColor="#01AE9D"
|
6 |
-
textColor="#D8D8E5"
|
7 |
font="monospace"
|
|
|
1 |
[theme]
|
2 |
+
base = "light"
|
|
|
|
|
|
|
|
|
3 |
font="monospace"
|
logo/haystack-logo-colored.png
ADDED
utils/ui.py
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
import streamlit as st
|
|
|
2 |
|
3 |
def set_state_if_absent(key, value):
|
4 |
if key not in st.session_state:
|
@@ -17,10 +18,13 @@ def set_openai_api_key(api_key: str):
|
|
17 |
|
18 |
def sidebar():
|
19 |
with st.sidebar:
|
|
|
|
|
|
|
20 |
st.markdown(
|
21 |
"## How to use\n"
|
22 |
-
"1. Enter your [OpenAI API key](https://platform.openai.com/account/api-keys) below
|
23 |
-
"2. Enter a
|
24 |
"3. Enjoy π€\n"
|
25 |
)
|
26 |
api_key_input = st.text_input(
|
@@ -36,11 +40,10 @@ def sidebar():
|
|
36 |
|
37 |
st.markdown("---")
|
38 |
st.markdown("### About\n"
|
39 |
-
"This app
|
40 |
-
"
|
41 |
-
"
|
42 |
-
"
|
43 |
-
"with instructions to run locally.")
|
44 |
st.markdown("Made by [tuanacelik](https://twitter.com/tuanacelik)")
|
45 |
st.markdown("---")
|
46 |
st.markdown("""Thanks to [mmz_001](https://twitter.com/mm_sasmitha)
|
|
|
1 |
import streamlit as st
|
2 |
+
from PIL import Image
|
3 |
|
4 |
def set_state_if_absent(key, value):
|
5 |
if key not in st.session_state:
|
|
|
18 |
|
19 |
def sidebar():
|
20 |
with st.sidebar:
|
21 |
+
image = Image.open('logo/haystack-logo-colored.png')
|
22 |
+
st.image(image, width=250)
|
23 |
+
|
24 |
st.markdown(
|
25 |
"## How to use\n"
|
26 |
+
"1. Enter your [OpenAI API key](https://platform.openai.com/account/api-keys) below\n"
|
27 |
+
"2. Enter a Twitter username in the searchbar\n"
|
28 |
"3. Enjoy π€\n"
|
29 |
)
|
30 |
api_key_input = st.text_input(
|
|
|
40 |
|
41 |
st.markdown("---")
|
42 |
st.markdown("### About\n"
|
43 |
+
"This app was built with [Haystack](https://haystack.deepset.ai) using the"
|
44 |
+
" [PromptNode](https://docs.haystack.deepset.ai/docs/prompt_node) and custom [PromptTemplate](https://docs.haystack.deepset.ai/docs/prompt_node#templates)."
|
45 |
+
" The source code is also on [GitHub](https://github.com/TuanaCelik/should-i-follow)"
|
46 |
+
" with instructions to run locally.")
|
|
|
47 |
st.markdown("Made by [tuanacelik](https://twitter.com/tuanacelik)")
|
48 |
st.markdown("---")
|
49 |
st.markdown("""Thanks to [mmz_001](https://twitter.com/mm_sasmitha)
|