Upload folder using huggingface_hub
Browse files- src/app.py +4 -6
src/app.py
CHANGED
|
@@ -170,19 +170,17 @@ def main() -> None:
|
|
| 170 |
|
| 171 |
# Sidebar
|
| 172 |
with st.sidebar:
|
| 173 |
-
st.header("⚙️ Configuration")
|
| 174 |
-
|
| 175 |
# In HF Space, always use HF model and hide selection
|
| 176 |
is_in_space = _is_running_in_hf_space()
|
| 177 |
default_source = _get_default_source()
|
| 178 |
|
| 179 |
if is_in_space:
|
| 180 |
-
# In Space
|
| 181 |
source = "hf"
|
| 182 |
-
|
| 183 |
-
st.caption("Model loaded from Hugging Face Model Hub")
|
| 184 |
else:
|
| 185 |
-
# Local development: show
|
|
|
|
| 186 |
source = st.radio(
|
| 187 |
"📦 Model Source:",
|
| 188 |
options=["local", "hf"],
|
|
|
|
| 170 |
|
| 171 |
# Sidebar
|
| 172 |
with st.sidebar:
|
|
|
|
|
|
|
| 173 |
# In HF Space, always use HF model and hide selection
|
| 174 |
is_in_space = _is_running_in_hf_space()
|
| 175 |
default_source = _get_default_source()
|
| 176 |
|
| 177 |
if is_in_space:
|
| 178 |
+
# In Space: completely hide model source selection, always use HF
|
| 179 |
source = "hf"
|
| 180 |
+
# Don't show any configuration UI in Space
|
|
|
|
| 181 |
else:
|
| 182 |
+
# Local development: show configuration section
|
| 183 |
+
st.header("⚙️ Configuration")
|
| 184 |
source = st.radio(
|
| 185 |
"📦 Model Source:",
|
| 186 |
options=["local", "hf"],
|