Update app.py
Browse files
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 |
-
|
55 |
-
|
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(
|
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())
|