sabatale commited on
Commit
90b06d9
·
verified ·
1 Parent(s): e3bfd01

Update utils/ui.py

Browse files
Files changed (1) hide show
  1. utils/ui.py +3 -39
utils/ui.py CHANGED
@@ -18,42 +18,6 @@ def set_openai_api_key(api_key: str):
18
 
19
  def sidebar():
20
  with st.sidebar:
21
- image = Image.open('logo/haystack-logo-colored.png')
22
- st.markdown("Thanks for coming to this 🤗 Space.\n\n"
23
- "This is a project for fun, and is not a final product."
24
- " There's a lot that can be improved to make this app better.\n\n"
25
- "**Take results with a grain of** 🧂\n\n"
26
- "For more on how this was built, instructions to run locally and to contribute: [visit GitHub](https://github.com/TuanaCelik/should-i-follow#readme)")
27
-
28
- st.markdown(
29
- "## How to use\n"
30
- "1. Enter your [OpenAI API key](https://platform.openai.com/account/api-keys) below\n"
31
- "2. Enter a Mastodon username in the searchbar\n"
32
- "3. Enjoy 🤗\n"
33
- )
34
-
35
- api_key_input = st.text_input(
36
- "OpenAI API Key",
37
- type="password",
38
- placeholder="Paste your OpenAI API key here (sk-...)",
39
- help="You can get your API key from https://platform.openai.com/account/api-keys.",
40
- value=st.session_state.get("OPENAI_API_KEY", ""),
41
- )
42
-
43
- if api_key_input:
44
- set_openai_api_key(api_key_input)
45
-
46
- st.markdown("---")
47
- st.markdown(
48
- "## How this works\n"
49
- "This app was built with [Haystack 2.0-Beta](https://haystack.deepset.ai) using the"
50
- " [`OpenAIGenerator`](https://docs.haystack.deepset.ai/v2.0/docs/openaigenerator) and [`PromptBuilder`](https://docs.haystack.deepset.ai/v2.0/docs/promptbuilder).\n\n"
51
- " The source code is also on [GitHub](https://github.com/TuanaCelik/should-i-follow)"
52
- " with instructions to run locally.\n"
53
- "You can see how the `PromptBuilder` was set up [here](https://github.com/TuanaCelik/should-i-follow/blob/main/utils/haystack.py)")
54
- st.markdown("---")
55
- st.markdown("Made by [tuanacelik](https://twitter.com/tuanacelik)")
56
- st.markdown("---")
57
- st.markdown("""Thanks to [mmz_001](https://twitter.com/mm_sasmitha)
58
- for open sourcing [KnowledgeGPT](https://knowledgegpt.streamlit.app/) which helped me with this sidebar 🙏🏽""")
59
- st.image(image, width=250)
 
18
 
19
  def sidebar():
20
  with st.sidebar:
21
+ st.markdown("Thanks for checking this demo! 🎈\n
22
+ Enter a short question and click ASK. That's it!\n\n
23
+ The app currently runs on Cohere AI. This can be changed to any other provider.")