Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -41,13 +41,16 @@ if st.button('Extract the property'):
|
|
41 |
'question': question_1,
|
42 |
'context': context
|
43 |
})
|
44 |
-
st.json(out)
|
45 |
value = out["answer"]
|
|
|
|
|
46 |
question_2 = f"What material has {property} of {value}?"
|
47 |
out = pipe({
|
48 |
'question': question_2,
|
49 |
'context': context
|
50 |
})
|
51 |
-
|
|
|
|
|
52 |
else:
|
53 |
st.write("Please enter both a question and context.")
|
|
|
41 |
'question': question_1,
|
42 |
'context': context
|
43 |
})
|
|
|
44 |
value = out["answer"]
|
45 |
+
st.write(f"First-turn question: {question_1}")
|
46 |
+
st.write(f"First-turn answer: {value}")
|
47 |
question_2 = f"What material has {property} of {value}?"
|
48 |
out = pipe({
|
49 |
'question': question_2,
|
50 |
'context': context
|
51 |
})
|
52 |
+
material = out["answer"]
|
53 |
+
st.write(f"Second-turn question: {question_2}")
|
54 |
+
st.write(f"First-turn answer: {material}")
|
55 |
else:
|
56 |
st.write("Please enter both a question and context.")
|