updated prompt
Browse files
app.py
CHANGED
|
@@ -46,13 +46,13 @@ if st.session_state.context:
|
|
| 46 |
|
| 47 |
if question:
|
| 48 |
result = qa(question=question, context=st.session_state.context)
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
# save convo
|
| 54 |
st.session_state.chat_history.append(
|
| 55 |
-
{"user": question, "bot":
|
| 56 |
)
|
| 57 |
|
| 58 |
# Display chat
|
|
|
|
| 46 |
|
| 47 |
if question:
|
| 48 |
result = qa(question=question, context=st.session_state.context)
|
| 49 |
+
|
| 50 |
+
prompt = f"{question}\n{result['answer']}"
|
| 51 |
+
generated = text_gen(prompt, max_length=100, do_sample=True)[0]['generated_text']
|
| 52 |
+
|
| 53 |
# save convo
|
| 54 |
st.session_state.chat_history.append(
|
| 55 |
+
{"user": question, "bot": generated}
|
| 56 |
)
|
| 57 |
|
| 58 |
# Display chat
|