Spaces:
Running
Running
Update src/streamlit_app.py
Browse files- src/streamlit_app.py +7 -1
src/streamlit_app.py
CHANGED
@@ -52,10 +52,16 @@ clip_model, clip_processor, text_model = load_models()
|
|
52 |
|
53 |
# ========== 📥 Load Dataset ==========
|
54 |
@st.cache_resource(show_spinner=False)
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
def load_medical_data():
|
56 |
dataset = load_dataset(
|
57 |
"univanxx/3mdbench",
|
58 |
-
split=
|
59 |
cache_dir=os.environ["HF_DATASETS_CACHE"]
|
60 |
)
|
61 |
return dataset
|
|
|
52 |
|
53 |
# ========== 📥 Load Dataset ==========
|
54 |
@st.cache_resource(show_spinner=False)
|
55 |
+
from datasets import get_dataset_split_names
|
56 |
+
|
57 |
+
available_splits = get_dataset_split_names("univanxx/3mdbench")
|
58 |
+
# Pick 'train' if available, otherwise first available split
|
59 |
+
split_to_use = "train" if "train" in available_splits else available_splits[0]
|
60 |
+
|
61 |
def load_medical_data():
|
62 |
dataset = load_dataset(
|
63 |
"univanxx/3mdbench",
|
64 |
+
split=split_to_use,
|
65 |
cache_dir=os.environ["HF_DATASETS_CACHE"]
|
66 |
)
|
67 |
return dataset
|