ayethuzar commited on
Commit
719ee6f
1 Parent(s): 8cd178f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -16,6 +16,10 @@ st.write("This model is tuned with all patent applications submitted in Jan 2016
16
  # prepopulate with a sample csv file that has one patent application
17
  dataframe = pd.read_csv('patent_application.csv')
18
 
 
 
 
 
19
  # to upload a .csv file with one application
20
  uploaded_file = st.file_uploader("Choose a file")
21
  if uploaded_file is not None:
@@ -33,7 +37,7 @@ if uploaded_file is not None:
33
 
34
  # Can be used wherever a "file-like" object is accepted:
35
  dataframe = pd.read_csv(uploaded_file)
36
- st.write(dataframe)
37
 
38
  tuple_of_choices = ('patent_number', 'title', 'background', 'summary', 'description')
39
 
 
16
  # prepopulate with a sample csv file that has one patent application
17
  dataframe = pd.read_csv('patent_application.csv')
18
 
19
+ # drop decision column if it exists
20
+ if 'decision' in dataframe.columns:
21
+ dataframe.drop(['decision'], axis=1, inplace = True)
22
+
23
  # to upload a .csv file with one application
24
  uploaded_file = st.file_uploader("Choose a file")
25
  if uploaded_file is not None:
 
37
 
38
  # Can be used wherever a "file-like" object is accepted:
39
  dataframe = pd.read_csv(uploaded_file)
40
+ st.write(dataframe)
41
 
42
  tuple_of_choices = ('patent_number', 'title', 'background', 'summary', 'description')
43