Update pages/bot.py
Browse files- 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 |
-
|
|
|
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
|