Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -69,7 +69,7 @@ if uploaded_file:
|
|
69 |
"is_grant_app": is_grant_app,
|
70 |
})
|
71 |
collection.insert_one(chunk)
|
72 |
-
|
73 |
st.success(f"✅ {len(chunks)} chunks inserted into `{selected_collection}`")
|
74 |
|
75 |
# Show a few previews
|
@@ -82,7 +82,10 @@ if uploaded_file:
|
|
82 |
if len(chunks) > 3:
|
83 |
st.info(f"... and {len(chunks)-3} more chunks processed.")
|
84 |
# st.success(f"✅ {len(chunks)} chunks inserted into `{selected_collection}`")
|
85 |
-
|
|
|
|
|
|
|
86 |
# Rerun the app to refresh the UI
|
87 |
st.rerun()
|
88 |
|
|
|
69 |
"is_grant_app": is_grant_app,
|
70 |
})
|
71 |
collection.insert_one(chunk)
|
72 |
+
|
73 |
st.success(f"✅ {len(chunks)} chunks inserted into `{selected_collection}`")
|
74 |
|
75 |
# Show a few previews
|
|
|
82 |
if len(chunks) > 3:
|
83 |
st.info(f"... and {len(chunks)-3} more chunks processed.")
|
84 |
# st.success(f"✅ {len(chunks)} chunks inserted into `{selected_collection}`")
|
85 |
+
try:
|
86 |
+
os.remove(temp_path)
|
87 |
+
except Exception as e:
|
88 |
+
st.warning(f"⚠️ Could not delete temp file: {e}")
|
89 |
# Rerun the app to refresh the UI
|
90 |
st.rerun()
|
91 |
|