Spaces:
Runtime error
Runtime error
Update app.py
Browse filesRemoved context and question from answer
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 |
-
|
|
|
|
| 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 |
|