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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -4
app.py CHANGED
@@ -13,13 +13,11 @@ st.title('Can I Patent This?')
13
 
14
  st.write("This model is tuned with all patent applications submitted in Jan 2016 in [the Harvard USPTO patent dataset](https://github.com/suzgunmirac/hupd)")
15
 
 
 
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,6 +35,11 @@ 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')
 
13
 
14
  st.write("This model is tuned with all patent applications submitted in Jan 2016 in [the Harvard USPTO patent dataset](https://github.com/suzgunmirac/hupd)")
15
 
16
+ st.write("You can upload a .csv file with a patent application to calculate the patentability score")
17
+
18
  # prepopulate with a sample csv file that has one patent application
19
  dataframe = pd.read_csv('patent_application.csv')
20
 
 
 
 
 
21
  # to upload a .csv file with one application
22
  uploaded_file = st.file_uploader("Choose a file")
23
  if uploaded_file is not None:
 
35
 
36
  # Can be used wherever a "file-like" object is accepted:
37
  dataframe = pd.read_csv(uploaded_file)
38
+
39
+ # drop decision column if it exists
40
+ if 'decision' in dataframe.columns:
41
+ dataframe.drop(['decision'], axis=1, inplace = True)
42
+
43
  st.write(dataframe)
44
 
45
  tuple_of_choices = ('patent_number', 'title', 'background', 'summary', 'description')