andreska commited on
Commit
d506e43
·
verified ·
1 Parent(s): e0eb52e

Update app.py

Browse files

Removed context and question from answer

Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -14,7 +14,8 @@ if st.button("Submit"):
14
  if user_input:
15
  text_inputs = f"Context: {context}\nQuestion: {user_input}\nAnswer:"
16
  result = pipe(text_inputs)[0]['generated_text']
17
- st.write(f"Adrega AI: {result}")
 
18
  else:
19
  st.write("Please enter a question.")
20
 
 
14
  if user_input:
15
  text_inputs = f"Context: {context}\nQuestion: {user_input}\nAnswer:"
16
  result = pipe(text_inputs)[0]['generated_text']
17
+ answer = result.split("Answer:")[1].strip()
18
+ st.write(f"Adrega AI: {answer}")
19
  else:
20
  st.write("Please enter a question.")
21