ZongqianLi commited on
Commit
acabee9
·
verified ·
1 Parent(s): 6430282

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
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
- st.json(out)
 
 
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.")