Spaces:
Sleeping
Sleeping
One more try, without answer in input
Browse files
app.py
CHANGED
|
@@ -26,7 +26,8 @@ context = "Adrega is a very cool company, that implements AI. Rett fra Rio is a
|
|
| 26 |
user_input = st.text_input('Ask me a question')
|
| 27 |
if st.button("Submit"):
|
| 28 |
if user_input:
|
| 29 |
-
answer = pipe(f"Context: {context}\nQuestion: {user_input}\nAnswer:")
|
|
|
|
| 30 |
#result = pipe(text_inputs, max_length=200, num_return_sequences=1)[0]['generated_text']
|
| 31 |
#answer = result.split("Answer:")[1].strip()
|
| 32 |
#answer = pipe(question=user_input, context=context)
|
|
|
|
| 26 |
user_input = st.text_input('Ask me a question')
|
| 27 |
if st.button("Submit"):
|
| 28 |
if user_input:
|
| 29 |
+
#answer = pipe(f"Context: {context}\nQuestion: {user_input}\nAnswer:")
|
| 30 |
+
answer = pipe("question: What is 42 ? context: 42 is the answer to life, the universe and everything")
|
| 31 |
#result = pipe(text_inputs, max_length=200, num_return_sequences=1)[0]['generated_text']
|
| 32 |
#answer = result.split("Answer:")[1].strip()
|
| 33 |
#answer = pipe(question=user_input, context=context)
|