VarshithaChennamsetti commited on
Commit
304fcaf
2 Parent(s): 9370cde 0eef6be

Merge pull request #7 from VarshithaChennamsetti/milestone-3

Browse files
Files changed (1) hide show
  1. patent_app.py +6 -1
patent_app.py CHANGED
@@ -39,10 +39,15 @@ val_set = val_set.filter(lambda e: e['decision'] <= 1)
39
  # Display all patent numbers to select a file
40
  patent_num = st.selectbox("Select a patent based on its number", val_set['patent_number'])
41
 
 
 
 
 
 
42
  button_1 = st.button('Get Data to predict!')
43
 
44
  # Get the abstract and claims data to predict
45
- if patent_num and (button_1 | st.button('Predict!')):
46
  # Display the abstract and claims
47
  val_set = val_set.filter(lambda e: e['patent_number'] == patent_num)
48
 
 
39
  # Display all patent numbers to select a file
40
  patent_num = st.selectbox("Select a patent based on its number", val_set['patent_number'])
41
 
42
+
43
+ # Keeping the session state
44
+ if "button_clicked" not in st.session_state:
45
+ st.session_state.button_clicked = False
46
+
47
  button_1 = st.button('Get Data to predict!')
48
 
49
  # Get the abstract and claims data to predict
50
+ if patent_num and (button_1 or st.session_state.button_clicked):
51
  # Display the abstract and claims
52
  val_set = val_set.filter(lambda e: e['patent_number'] == patent_num)
53