ErikH commited on
Commit
c2c1450
1 Parent(s): caeaed3

Update pages/bot.py

Browse files
Files changed (1) hide show
  1. pages/bot.py +2 -2
pages/bot.py CHANGED
@@ -95,7 +95,7 @@ def main():
95
  question=user_question
96
  st.text(user_question)
97
  context=""+retrieved_docs[0].page_content+retrieved_docs[1].page_content+retrieved_docs[3].page_content
98
- context.replace("\n", " ")
99
  st.text("Das ist der Kontext:")
100
  st.text(context)
101
 
@@ -103,7 +103,7 @@ def main():
103
  qa_pipeline = pipeline("question-answering", model="deutsche-telekom/bert-multi-english-german-squad2", tokenizer="deutsche-telekom/bert-multi-english-german-squad2")
104
 
105
  # Frage beantworten
106
- answer = qa_pipeline(question=question, context=context)
107
 
108
  # Gib die Antwort aus
109
  st.text("Basisantwort:")
 
95
  question=user_question
96
  st.text(user_question)
97
  context=""+retrieved_docs[0].page_content+retrieved_docs[1].page_content+retrieved_docs[3].page_content
98
+ context.replace("\n", "TEST")
99
  st.text("Das ist der Kontext:")
100
  st.text(context)
101
 
 
103
  qa_pipeline = pipeline("question-answering", model="deutsche-telekom/bert-multi-english-german-squad2", tokenizer="deutsche-telekom/bert-multi-english-german-squad2")
104
 
105
  # Frage beantworten
106
+ answer = qa_pipeline(question=question, context=context,)
107
 
108
  # Gib die Antwort aus
109
  st.text("Basisantwort:")