Spaces:
Runtime error
Runtime error
Try to fix bug where input was not provided
Browse files
app.py
CHANGED
|
@@ -12,8 +12,9 @@ context = "Adrega is a very cool company, that implements AI" #dataset[0]["text"
|
|
| 12 |
user_input = st.text_input('Ask me a question')
|
| 13 |
if st.button("Submit"):
|
| 14 |
if user_input:
|
| 15 |
-
|
| 16 |
-
|
|
|
|
| 17 |
else:
|
| 18 |
st.write("Please enter a question.")
|
| 19 |
|
|
|
|
| 12 |
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)[0]['generated_text']
|
| 17 |
+
st.write(f"Adrega AI: {result}"
|
| 18 |
else:
|
| 19 |
st.write("Please enter a question.")
|
| 20 |
|