ErikH commited on
Commit
8237a67
1 Parent(s): d9e7248

Update pages/bot.py

Browse files
Files changed (1) hide show
  1. pages/bot.py +2 -2
pages/bot.py CHANGED
@@ -81,10 +81,10 @@ def main():
81
  )
82
  if user_question:
83
  st.text(retrieved_docs[0].page_content)
84
- qa_pipeline = pipeline("question-answering", model="tiiuae/falcon-40b", tokenizer="tiiuae/falcon-40b")
85
  context=retrieved_docs[0].page_content
86
  question=user_question
87
- answer = qa_pipeline(question=question, context=context)
 
88
  st.text("FORMATIERTE ANTWORT:")
89
  st.text(answer)
90
  # bei incoming pdf
 
81
  )
82
  if user_question:
83
  st.text(retrieved_docs[0].page_content)
 
84
  context=retrieved_docs[0].page_content
85
  question=user_question
86
+ generator = pipeline('text-generation', model = 'gpt2')
87
+ answer = generator(context, max_length = 30, num_return_sequences=3)
88
  st.text("FORMATIERTE ANTWORT:")
89
  st.text(answer)
90
  # bei incoming pdf