akdeniz27 commited on
Commit
97c78a4
1 Parent(s): ea92492

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -51,8 +51,8 @@ st.header("Contract Understanding Atticus Dataset (CUAD) Demo")
51
  st.write("Based on https://github.com/marshmellow77/cuad-demo")
52
 
53
 
54
- question = st.selectbox('Choose one of the 41 queries from the CUAD dataset:', questions)
55
- # paragraph = st.text_area(label="Contract")
56
 
57
  contract_type = st.radio("Select Contract", ("Sample Contract", "New Contract"))
58
  if contract_type == "Sample Contract":
@@ -66,5 +66,5 @@ else:
66
  Run_Button = st.button("Run", key=None)
67
  if Run_Button == True and not len(contract)==0 and not len(question)==0:
68
 
69
- prediction = run_prediction(question, contract, 'akdeniz27/roberta-base-cuad')
70
  st.write("Answer: " + prediction.strip())
 
51
  st.write("Based on https://github.com/marshmellow77/cuad-demo")
52
 
53
 
54
+ selected_question = st.selectbox('Choose one of the 41 queries from the CUAD dataset:', questions)
55
+ question_set = [questions[0], selected_question]
56
 
57
  contract_type = st.radio("Select Contract", ("Sample Contract", "New Contract"))
58
  if contract_type == "Sample Contract":
 
66
  Run_Button = st.button("Run", key=None)
67
  if Run_Button == True and not len(contract)==0 and not len(question)==0:
68
 
69
+ prediction = run_prediction(question_set, contract, 'akdeniz27/roberta-base-cuad')
70
  st.write("Answer: " + prediction.strip())