Update app.py
Browse files
app.py
CHANGED
|
@@ -13,7 +13,6 @@ def extract_zip(zip_file_path, extract_dir):
|
|
| 13 |
with zipfile.ZipFile(zip_file_path, 'r') as zip_ref:
|
| 14 |
zip_ref.extractall(extract_dir)
|
| 15 |
|
| 16 |
-
# Function to get embeddings
|
| 17 |
# Function to get embeddings
|
| 18 |
def get_embeddings(db_dir):
|
| 19 |
app = FaceAnalysis(name='buffalo_l')
|
|
@@ -75,11 +74,12 @@ def main():
|
|
| 75 |
if st.button("Download Files"):
|
| 76 |
st.markdown("### Download names.npy:")
|
| 77 |
with open("temp/names.npy", "rb") as file:
|
| 78 |
-
st.download_button("Download names.npy", file.
|
| 79 |
|
| 80 |
st.markdown("### Download embeddings.npy:")
|
| 81 |
with open("temp/embeddings.npy", "rb") as file:
|
| 82 |
-
st.download_button("Download embeddings.npy", file.
|
|
|
|
| 83 |
|
| 84 |
if st.button("Delete Files"):
|
| 85 |
delete_files("temp")
|
|
|
|
| 13 |
with zipfile.ZipFile(zip_file_path, 'r') as zip_ref:
|
| 14 |
zip_ref.extractall(extract_dir)
|
| 15 |
|
|
|
|
| 16 |
# Function to get embeddings
|
| 17 |
def get_embeddings(db_dir):
|
| 18 |
app = FaceAnalysis(name='buffalo_l')
|
|
|
|
| 74 |
if st.button("Download Files"):
|
| 75 |
st.markdown("### Download names.npy:")
|
| 76 |
with open("temp/names.npy", "rb") as file:
|
| 77 |
+
st.download_button("Download names.npy", file.read(), file_name="names.npy", mime="application/octet-stream")
|
| 78 |
|
| 79 |
st.markdown("### Download embeddings.npy:")
|
| 80 |
with open("temp/embeddings.npy", "rb") as file:
|
| 81 |
+
st.download_button("Download embeddings.npy", file.read(), file_name="embeddings.npy", mime="application/octet-stream")
|
| 82 |
+
|
| 83 |
|
| 84 |
if st.button("Delete Files"):
|
| 85 |
delete_files("temp")
|