anujmaha commited on
Commit
6f2d9e1
β€’
1 Parent(s): 9a8052a

Added sidebar

Browse files
Files changed (2) hide show
  1. app.py +60 -5
  2. langchain background removed.png +0 -0
app.py CHANGED
@@ -27,14 +27,69 @@ import base64
27
 
28
  st.header("LangChain πŸ¦œπŸ”— Documentation - Helper ChatBot")
29
 
30
- st.sidebar.markdown(
 
 
 
 
 
31
  """
32
- This is Langchain Helper Bot.
33
- What this offers is easy scraping of Langchain documentation.
34
- Instead of going through tedious Langchain documentation, just submit your query over here about any langchain topic and you will get the answer.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
  """
36
  )
 
 
 
 
 
 
 
 
 
37
 
 
 
 
 
 
 
 
 
 
 
 
 
38
 
39
  if "user_prompt_history" not in st.session_state:
40
  st.session_state["user_prompt_history"] = []
@@ -57,7 +112,7 @@ def create_sources_string(source_urls: Set[str]) -> str:
57
  return sources_string
58
 
59
 
60
- prompt = st.text_input("Prompt", placeholder="Enter your message here...")
61
 
62
 
63
  if prompt:
 
27
 
28
  st.header("LangChain πŸ¦œπŸ”— Documentation - Helper ChatBot")
29
 
30
+ # profile_image = Image.open("langchain background removed.png")
31
+
32
+ # st.sidebar.image(profile_image, width=200)
33
+
34
+
35
+ st.markdown(
36
  """
37
+ <style>
38
+ [data-testid=stSidebar] [data-testid=stImage]{
39
+ text-align: center;
40
+ display: block;
41
+ margin-left: auto;
42
+ margin-right: auto;
43
+ width: 100%;
44
+ }
45
+ </style>
46
+ """, unsafe_allow_html=True
47
+ )
48
+
49
+ with st.sidebar:
50
+ st.image("langchain background removed.png", width = 200)
51
+
52
+ st.sidebar.markdown(
53
+ """
54
+ # LangChain Helper Bot πŸ€–
55
+
56
+ Welcome to the LangChain Helper Bot!
57
+
58
+ **What does it offer ?**
59
+
60
+ πŸš€ Easy scraping of LangChain documentation.
61
+
62
+ πŸ“š Instead of going through tedious LangChain documentation, just submit your query here about any LangChain topic, and you'll get the answer!
63
+
64
+ ---
65
+
66
+ **How to use ?**
67
+
68
+ Just type your LangChain-related query in the input box on the main page, and the bot will fetch precise information for you.
69
  """
70
  )
71
+
72
+
73
+ with st.sidebar:
74
+
75
+ st.caption(
76
+ """The official documentation of langchain can be found at
77
+ https://python.langchain.com/docs/get_started
78
+ """
79
+ )
80
 
81
+ st.markdown("---")
82
+ st.markdown(
83
+ '<h6>Made in &nbsp<img src="https://streamlit.io/images/brand/streamlit-mark-color.png" alt="Streamlit logo" height="16">&nbsp by <a href="https://www.linkedin.com/in/anujmaha/">@anujmaha</a></h6>',
84
+ unsafe_allow_html=True,
85
+ )
86
+ st.markdown(
87
+ 'πŸ“§ : anujsmahajan1998@gmail.com',
88
+ )
89
+ st.markdown(
90
+ '<div style="margin-top: 0.75em;"><img src="https://cdn.buymeacoffee.com/buttons/default-orange.png" alt="Buy Me A Coffee" height="41" width="174"></a></div>',
91
+ unsafe_allow_html=True,
92
+ )
93
 
94
  if "user_prompt_history" not in st.session_state:
95
  st.session_state["user_prompt_history"] = []
 
112
  return sources_string
113
 
114
 
115
+ prompt = st.text_input("Prompt", placeholder="Enter your Langchain related query here... (eg, what is ConversationalRetrievalChain ?)")
116
 
117
 
118
  if prompt:
langchain background removed.png ADDED