kamau1 commited on
Commit
7d6b2a6
·
verified ·
1 Parent(s): db2290d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -9
app.py CHANGED
@@ -111,7 +111,22 @@ st.markdown ("""
111
  }
112
  </style>""", unsafe_allow_html=True)
113
 
114
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
115
 
116
  def main():
117
  st.title("SemaNaPDF📚")
@@ -148,6 +163,7 @@ def main():
148
  user_langd, Queryd = translate(user_question, 'eng_Latn')
149
  st.session_state.messages.append({"role": "user", "content": user_question})
150
  response = st.session_state.conversation({"question": Queryd}) #Queryd
 
151
  st.session_state.chat_history = response["chat_history"]
152
 
153
  output = translate(response['answer'], user_langd, 'eng_Latn')[1] # translated response
@@ -157,14 +173,7 @@ def main():
157
  st.session_state.messages.append({"role": "assistant", "content": response['answer']})
158
 
159
  # Signature
160
- st.markdown(
161
- """
162
- <div style="position: fixed; bottom: 0; right: 0; padding: 10px;">
163
- <a href="https://kamaukimaru.vercel.app" target="_blank" style="font-size: 12px; color: #269129; text-decoration: none;">©2023 Lewis Kimaru. All rights reserved.</a>
164
- </div>
165
- """,
166
- unsafe_allow_html=True
167
- )
168
 
169
 
170
  if __name__ == '__main__':
 
111
  }
112
  </style>""", unsafe_allow_html=True)
113
 
114
+ footer = """
115
+ <style>
116
+ .footer {
117
+ position: fixed;
118
+ bottom: 0;
119
+ right: 0;
120
+ background-color: #f8f9fa;
121
+ padding: 10px;
122
+ text-align: right;
123
+ width: 100%;
124
+ }
125
+ </style>
126
+ <div class="footer">
127
+ ©2023 Lewis Kimaru. All rights reserved.
128
+ </div>
129
+ """
130
 
131
  def main():
132
  st.title("SemaNaPDF📚")
 
163
  user_langd, Queryd = translate(user_question, 'eng_Latn')
164
  st.session_state.messages.append({"role": "user", "content": user_question})
165
  response = st.session_state.conversation({"question": Queryd}) #Queryd
166
+ print(response)
167
  st.session_state.chat_history = response["chat_history"]
168
 
169
  output = translate(response['answer'], user_langd, 'eng_Latn')[1] # translated response
 
173
  st.session_state.messages.append({"role": "assistant", "content": response['answer']})
174
 
175
  # Signature
176
+ st.markdown(footer, unsafe_allow_html=True)
 
 
 
 
 
 
 
177
 
178
 
179
  if __name__ == '__main__':