Spaces:
Sleeping
Sleeping
Reduced length to 200
Browse files
app.py
CHANGED
|
@@ -13,7 +13,7 @@ user_input = st.text_input('Ask me a question')
|
|
| 13 |
if st.button("Submit"):
|
| 14 |
if user_input:
|
| 15 |
text_inputs = f"Context: {context}\nQuestion: {user_input}\nAnswer:"
|
| 16 |
-
result = pipe(text_inputs, max_length=
|
| 17 |
answer = result.split("Answer:")[1].strip()
|
| 18 |
st.write(f"Adrega AI: {answer}")
|
| 19 |
else:
|
|
|
|
| 13 |
if st.button("Submit"):
|
| 14 |
if user_input:
|
| 15 |
text_inputs = f"Context: {context}\nQuestion: {user_input}\nAnswer:"
|
| 16 |
+
result = pipe(text_inputs, max_length=200, num_return_sequences=1)[0]['generated_text']
|
| 17 |
answer = result.split("Answer:")[1].strip()
|
| 18 |
st.write(f"Adrega AI: {answer}")
|
| 19 |
else:
|