nurindahpratiwi commited on
Commit
4d6285b
β€’
1 Parent(s): e7551ac

add banner

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -9,13 +9,14 @@ from langchain.chains import ConversationalRetrievalChain
9
  from htmltemp import css, bot_template, user_template
10
  from langchain.llms import HuggingFaceHub
11
 
 
12
 
13
  def main():
14
  load_dotenv()
15
  st.set_page_config(page_title="PDF Chatbot", page_icon="πŸ“š")
16
  custom_html = """
17
  <div class="banner">
18
- <img src="https://www.canva.com/design/DAFys-F940k/2s_2FuK_FCWlBKS8VEWLMA/view?utm_content=DAFys-F940k&utm_campaign=designshare&utm_medium=link&utm_source=editor" alt="Banner Image">
19
  </div>
20
  <style>
21
  .banner {
@@ -93,7 +94,7 @@ def get_conversation_chain(vectorstore):
93
  llm = HuggingFaceHub(
94
  repo_id="google/flan-t5-large",
95
  model_kwargs={"temperature": 0.5, "max_length": 1024},
96
-
97
  )
98
 
99
  memory = ConversationBufferMemory(memory_key="chat_history", return_messages=True)
 
9
  from htmltemp import css, bot_template, user_template
10
  from langchain.llms import HuggingFaceHub
11
 
12
+ api_key = st.secrets['api_key']
13
 
14
  def main():
15
  load_dotenv()
16
  st.set_page_config(page_title="PDF Chatbot", page_icon="πŸ“š")
17
  custom_html = """
18
  <div class="banner">
19
+ <img src="https://huggingface.co/spaces/wiwaaw/summary/resolve/main/banner.png" alt="Banner Image">
20
  </div>
21
  <style>
22
  .banner {
 
94
  llm = HuggingFaceHub(
95
  repo_id="google/flan-t5-large",
96
  model_kwargs={"temperature": 0.5, "max_length": 1024},
97
+ huggingfacehub_api_token=api_key
98
  )
99
 
100
  memory = ConversationBufferMemory(memory_key="chat_history", return_messages=True)