Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -12,6 +12,17 @@ import openpyxl
|
|
| 12 |
import csv
|
| 13 |
import base64
|
| 14 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
# Enhanced state initialization
|
| 16 |
if 'file_data' not in st.session_state:
|
| 17 |
st.session_state.file_data = {}
|
|
|
|
| 12 |
import csv
|
| 13 |
import base64
|
| 14 |
|
| 15 |
+
# Supported file types and their handlers - Define this at the top level
|
| 16 |
+
FILE_TYPES = {
|
| 17 |
+
"md": "π Markdown",
|
| 18 |
+
"txt": "π Text",
|
| 19 |
+
"json": "π§ JSON",
|
| 20 |
+
"csv": "π CSV",
|
| 21 |
+
"xlsx": "π Excel",
|
| 22 |
+
"yaml": "βοΈ YAML",
|
| 23 |
+
"xml": "π XML"
|
| 24 |
+
}
|
| 25 |
+
|
| 26 |
# Enhanced state initialization
|
| 27 |
if 'file_data' not in st.session_state:
|
| 28 |
st.session_state.file_data = {}
|