Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -2,6 +2,7 @@ import streamlit as st
|
|
2 |
import huggingface_hub as hf_hub
|
3 |
import monai
|
4 |
import os
|
|
|
5 |
|
6 |
hf_hub.login(token=st.secrets["HF_TOKEN"])
|
7 |
|
@@ -9,10 +10,9 @@ with st.spinner("Downloading Dataset"):
|
|
9 |
data_path = hf_hub.hf_hub_download(repo_id="osbm/prostate158", filename="data.zip", repo_type="dataset")
|
10 |
|
11 |
st.write(data_path)
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
zip_ref.extractall(".")
|
16 |
|
17 |
|
18 |
st.write(os.listdir(os.getcwd()))
|
|
|
2 |
import huggingface_hub as hf_hub
|
3 |
import monai
|
4 |
import os
|
5 |
+
import zipfile
|
6 |
|
7 |
hf_hub.login(token=st.secrets["HF_TOKEN"])
|
8 |
|
|
|
10 |
data_path = hf_hub.hf_hub_download(repo_id="osbm/prostate158", filename="data.zip", repo_type="dataset")
|
11 |
|
12 |
st.write(data_path)
|
13 |
+
with st.spinnet("Unzipping..."):
|
14 |
+
with zipfile.ZipFile(data_path, 'r') as zip_ref:
|
15 |
+
zip_ref.extractall(".")
|
|
|
16 |
|
17 |
|
18 |
st.write(os.listdir(os.getcwd()))
|