MaxGit32 commited on
Commit
67a7262
·
1 Parent(s): 11b04e8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -74,7 +74,7 @@ def get_vectorstore():
74
 
75
  def main():
76
  load_dotenv()
77
- user_question = "Wie lautet deine Frage?"
78
  folder_path = './PDFs'
79
  pdf_text = get_pdf_text(folder_path)
80
  text_chunks = get_text_chunks(pdf_text)
@@ -82,9 +82,10 @@ def main():
82
 
83
  retriever=get_vectorstore().as_retriever()
84
  retrieved_docs=retriever.invoke(
85
- "Was macht man im Katastrophenfall?"
86
  )
87
- st.text(retrieved_docs[0].page_content)
 
88
  # bei incoming pdf
89
 
90
  #vectorstore_DB=get_vectorstore() # bei Abfrage durch Chatbot
 
74
 
75
  def main():
76
  load_dotenv()
77
+ user_question = st.text_area("Eingabe:")
78
  folder_path = './PDFs'
79
  pdf_text = get_pdf_text(folder_path)
80
  text_chunks = get_text_chunks(pdf_text)
 
82
 
83
  retriever=get_vectorstore().as_retriever()
84
  retrieved_docs=retriever.invoke(
85
+ user_question
86
  )
87
+ if text:
88
+ st.text(retrieved_docs[0].page_content)
89
  # bei incoming pdf
90
 
91
  #vectorstore_DB=get_vectorstore() # bei Abfrage durch Chatbot