andreped commited on
Commit
428ebc1
·
1 Parent(s): 66b40bc

Refactored sidebar

Browse files
Files changed (1) hide show
  1. knowledge_gpt/components/sidebar.py +3 -23
knowledge_gpt/components/sidebar.py CHANGED
@@ -9,29 +9,9 @@ load_dotenv()
9
 
10
  def sidebar():
11
  with st.sidebar:
12
- st.markdown(
13
- "## How to use\n"
14
- "1. Enter your [OpenAI API key](https://platform.openai.com/account/api-keys) below🔑\n" # noqa: E501
15
- "2. Upload a pdf, docx, or txt file📄\n"
16
- "3. Ask a question about the document💬\n"
17
- )
18
- """
19
- api_key_input = st.text_input(
20
- "OpenAI API Key",
21
- type="password",
22
- placeholder="Paste your OpenAI API key here (sk-...)",
23
- help="You can get your API key from https://platform.openai.com/account/api-keys.", # noqa: E501
24
- value=os.environ.get("OPENAI_API_KEY", None)
25
- or st.session_state.get("OPENAI_API_KEY", ""),
26
- )
27
-
28
- st.session_state["OPENAI_API_KEY"] = api_key_input
29
- """
30
-
31
- st.markdown("---")
32
  st.markdown("# About")
33
  st.markdown(
34
- "📖KnowledgeGPT allows you to ask questions about your "
35
  "documents and get accurate answers with instant citations. "
36
  )
37
  st.markdown(
@@ -39,7 +19,7 @@ def sidebar():
39
  "You can contribute to the project on [GitHub](https://github.com/mmz-001/knowledge_gpt) " # noqa: E501
40
  "with your feedback and suggestions💡"
41
  )
42
- st.markdown("Made by [mmz_001](https://twitter.com/mm_sasmitha)")
43
  st.markdown("---")
44
 
45
- faq()
 
9
 
10
  def sidebar():
11
  with st.sidebar:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
  st.markdown("# About")
13
  st.markdown(
14
+ "📖ReferenceBot allows you to ask questions about your "
15
  "documents and get accurate answers with instant citations. "
16
  )
17
  st.markdown(
 
19
  "You can contribute to the project on [GitHub](https://github.com/mmz-001/knowledge_gpt) " # noqa: E501
20
  "with your feedback and suggestions💡"
21
  )
22
+ st.markdown("The tool was based on KnowledgeGPT made by [mmz_001](https://twitter.com/mm_sasmitha).")
23
  st.markdown("---")
24
 
25
+ # faq()