Spaces:
Runtime error
Runtime error
Commit
·
dfc2950
1
Parent(s):
84d048b
bug fix
Browse files
app.py
CHANGED
@@ -28,13 +28,14 @@ _patent_id = st.selectbox(
|
|
28 |
dataset_dict["train"]["patent_number"],
|
29 |
)
|
30 |
|
31 |
-
|
32 |
-
|
33 |
-
|
|
|
34 |
|
35 |
-
# display abstract and claim
|
36 |
-
st.write(_abstract)
|
37 |
-
st.write(_claim)
|
38 |
|
39 |
# when submit button clicked, run the model and get result
|
40 |
if st.button("Submit"):
|
|
|
28 |
dataset_dict["train"]["patent_number"],
|
29 |
)
|
30 |
|
31 |
+
if _patent_id:
|
32 |
+
# get abstract and claim corresponding to this patent id
|
33 |
+
_abstract = dataset_dict["train"][["patent_number"] == _patent_id]["abstract"]
|
34 |
+
_claim = dataset_dict["train"][["patent_number"] == _patent_id]["claims"]
|
35 |
|
36 |
+
# display abstract and claim
|
37 |
+
st.write(_abstract)
|
38 |
+
st.write(_claim)
|
39 |
|
40 |
# when submit button clicked, run the model and get result
|
41 |
if st.button("Submit"):
|