Update README and add debug upload test - investigate file upload issues
Browse files- README.md +22 -8
- src/debug_upload.py +26 -0
README.md
CHANGED
|
@@ -1,20 +1,34 @@
|
|
| 1 |
---
|
| 2 |
title: Entity Resolution Network Analysis
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
sdk: docker
|
| 7 |
app_port: 8501
|
| 8 |
tags:
|
| 9 |
- streamlit
|
|
|
|
|
|
|
|
|
|
| 10 |
pinned: false
|
| 11 |
-
short_description:
|
| 12 |
license: mit
|
| 13 |
---
|
| 14 |
|
| 15 |
-
#
|
| 16 |
|
| 17 |
-
|
| 18 |
|
| 19 |
-
|
| 20 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
title: Entity Resolution Network Analysis
|
| 3 |
+
emoji: 🔗
|
| 4 |
+
colorFrom: blue
|
| 5 |
+
colorTo: green
|
| 6 |
sdk: docker
|
| 7 |
app_port: 8501
|
| 8 |
tags:
|
| 9 |
- streamlit
|
| 10 |
+
- entity-resolution
|
| 11 |
+
- network-analysis
|
| 12 |
+
- csv
|
| 13 |
pinned: false
|
| 14 |
+
short_description: Entity Resolution and Network Graph Visualization for CSV data
|
| 15 |
license: mit
|
| 16 |
---
|
| 17 |
|
| 18 |
+
# Entity Resolution Network Analysis
|
| 19 |
|
| 20 |
+
Upload CSV data and visualize entity resolution results with interactive network graphs using st-link-analysis.
|
| 21 |
|
| 22 |
+
## Features
|
| 23 |
+
|
| 24 |
+
- CSV file upload with entity resolution
|
| 25 |
+
- Interactive network graph visualization
|
| 26 |
+
- Similarity threshold controls
|
| 27 |
+
- Community detection
|
| 28 |
+
- Sample data for testing
|
| 29 |
+
|
| 30 |
+
## Usage
|
| 31 |
+
|
| 32 |
+
1. Upload a CSV file or use sample data
|
| 33 |
+
2. Configure similarity columns and threshold
|
| 34 |
+
3. Run entity resolution to see network connections
|
src/debug_upload.py
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import streamlit as st
|
| 2 |
+
import pandas as pd
|
| 3 |
+
|
| 4 |
+
st.title("File Upload Debug Test")
|
| 5 |
+
|
| 6 |
+
# Simple file uploader
|
| 7 |
+
uploaded_file = st.file_uploader("Upload CSV", type=["csv"])
|
| 8 |
+
|
| 9 |
+
st.write("Debug Info:")
|
| 10 |
+
st.write(f"uploaded_file object: {uploaded_file}")
|
| 11 |
+
st.write(f"uploaded_file is None: {uploaded_file is None}")
|
| 12 |
+
|
| 13 |
+
if uploaded_file is not None:
|
| 14 |
+
st.success(f"File detected: {uploaded_file.name}")
|
| 15 |
+
st.write(f"File size: {uploaded_file.size}")
|
| 16 |
+
st.write(f"File type: {uploaded_file.type}")
|
| 17 |
+
|
| 18 |
+
try:
|
| 19 |
+
df = pd.read_csv(uploaded_file)
|
| 20 |
+
st.success("CSV read successfully!")
|
| 21 |
+
st.write(f"Shape: {df.shape}")
|
| 22 |
+
st.dataframe(df.head())
|
| 23 |
+
except Exception as e:
|
| 24 |
+
st.error(f"Error reading CSV: {e}")
|
| 25 |
+
else:
|
| 26 |
+
st.warning("No file uploaded")
|