Spaces:
Running
Running
Update pages/2 Topic Modeling.py
Browse files
pages/2 Topic Modeling.py
CHANGED
|
@@ -241,7 +241,7 @@ def readxls(file):
|
|
| 241 |
return papers
|
| 242 |
|
| 243 |
#===Read data===
|
| 244 |
-
uploaded_file = st.file_uploader('', type=['csv', 'txt','json','tar.gz','xml','xls', 'xlsx'], on_change=reset_all)
|
| 245 |
|
| 246 |
if uploaded_file is not None:
|
| 247 |
try:
|
|
@@ -251,12 +251,10 @@ if uploaded_file is not None:
|
|
| 251 |
papers = upload(extype)
|
| 252 |
elif extype.endswith('.txt'):
|
| 253 |
papers = conv_txt(extype)
|
| 254 |
-
|
| 255 |
elif extype.endswith('.json'):
|
| 256 |
papers = conv_json(extype)
|
| 257 |
elif extype.endswith('.tar.gz') or extype.endswith('.xml'):
|
| 258 |
papers = conv_pub(uploaded_file)
|
| 259 |
-
|
| 260 |
elif extype.endswith(('.xls', '.xlsx')):
|
| 261 |
papers = readxls(uploaded_file)
|
| 262 |
|
|
|
|
| 241 |
return papers
|
| 242 |
|
| 243 |
#===Read data===
|
| 244 |
+
uploaded_file = st.file_uploader('', type=['csv', 'txt', 'json', 'tar.gz', 'xml', 'xls', 'xlsx'], on_change=reset_all)
|
| 245 |
|
| 246 |
if uploaded_file is not None:
|
| 247 |
try:
|
|
|
|
| 251 |
papers = upload(extype)
|
| 252 |
elif extype.endswith('.txt'):
|
| 253 |
papers = conv_txt(extype)
|
|
|
|
| 254 |
elif extype.endswith('.json'):
|
| 255 |
papers = conv_json(extype)
|
| 256 |
elif extype.endswith('.tar.gz') or extype.endswith('.xml'):
|
| 257 |
papers = conv_pub(uploaded_file)
|
|
|
|
| 258 |
elif extype.endswith(('.xls', '.xlsx')):
|
| 259 |
papers = readxls(uploaded_file)
|
| 260 |
|