Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
|
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 |
|