Spaces:
Sleeping
Sleeping
Commit
·
4d2ad6d
1
Parent(s):
0227912
added dropping duplicates
Browse files
app.py
CHANGED
@@ -39,11 +39,10 @@ DISABLE_FILE_UPLOAD = bool(os.getenv("DISABLE_FILE_UPLOAD"))
|
|
39 |
def show_documents_list(retrieved_documents):
|
40 |
data = []
|
41 |
for i, document in enumerate(retrieved_documents):
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
df
|
46 |
-
return df
|
47 |
|
48 |
# Define a function to handle file uploads
|
49 |
def upload_files():
|
|
|
39 |
def show_documents_list(retrieved_documents):
|
40 |
data = []
|
41 |
for i, document in enumerate(retrieved_documents):
|
42 |
+
data.append([document.id, document.meta['name']])
|
43 |
+
df = pd.DataFrame(data, columns=['Document ID', 'Uploaded Document Name'])
|
44 |
+
df.drop_duplicates(subset=['Document ID'], inplace=True)
|
45 |
+
return df[['Uploaded Document Name']]
|
|
|
46 |
|
47 |
# Define a function to handle file uploads
|
48 |
def upload_files():
|