Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -56,7 +56,7 @@ def read_csv_or_excel(file):
|
|
56 |
else:
|
57 |
raise ValueError("Unsupported file format. Only CSV and Excel files are supported.")
|
58 |
|
59 |
-
def
|
60 |
# Find rows with exact matches in the specified column
|
61 |
matches = pd.merge(df1, df2, on=column_name, how='inner')
|
62 |
return matches
|
@@ -120,14 +120,14 @@ def main():
|
|
120 |
# Compare button
|
121 |
if st.button("Compare"):
|
122 |
# Find exact matches
|
123 |
-
|
124 |
|
125 |
# Find similar texts
|
126 |
similar_texts, exact_matches = find_similar_texts(warehouse_df, industry_df, warehouse_column)
|
127 |
|
128 |
# Display results
|
129 |
st.header("Exact Matches")
|
130 |
-
st.write(
|
131 |
|
132 |
|
133 |
# Display exact matches
|
|
|
56 |
else:
|
57 |
raise ValueError("Unsupported file format. Only CSV and Excel files are supported.")
|
58 |
|
59 |
+
def find_exact_match(df1, df2, column_name):
|
60 |
# Find rows with exact matches in the specified column
|
61 |
matches = pd.merge(df1, df2, on=column_name, how='inner')
|
62 |
return matches
|
|
|
120 |
# Compare button
|
121 |
if st.button("Compare"):
|
122 |
# Find exact matches
|
123 |
+
exact_match = find_exact_match(warehouse_df, industry_df, warehouse_column)
|
124 |
|
125 |
# Find similar texts
|
126 |
similar_texts, exact_matches = find_similar_texts(warehouse_df, industry_df, warehouse_column)
|
127 |
|
128 |
# Display results
|
129 |
st.header("Exact Matches")
|
130 |
+
st.write(exact_match)
|
131 |
|
132 |
|
133 |
# Display exact matches
|