12ongo commited on
Commit
b6639b0
·
verified ·
1 Parent(s): f0156c3

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -1,13 +1,15 @@
1
 
 
2
  import streamlit as st
3
  import pandas as pd
4
  import requests
5
 
6
- # Configure backend URL (defaults to your Space). You can override in the UI.
7
  DEFAULT_BACKEND_URL = "https://12ongo-backendproject.hf.space"
 
 
8
  backend_url = st.text_input(
9
  "Backend URL",
10
- value=st.secrets.get("BACKEND_URL", DEFAULT_BACKEND_URL),
11
  help="Override if needed (e.g., local http://127.0.0.1:5000)",
12
  )
13
 
 
1
 
2
+ import os
3
  import streamlit as st
4
  import pandas as pd
5
  import requests
6
 
 
7
  DEFAULT_BACKEND_URL = "https://12ongo-backendproject.hf.space"
8
+ # Try env var first; fall back to default
9
+ backend_url_default = os.environ.get("BACKEND_URL", DEFAULT_BACKEND_URL)
10
  backend_url = st.text_input(
11
  "Backend URL",
12
+ value=backend_url_default,
13
  help="Override if needed (e.g., local http://127.0.0.1:5000)",
14
  )
15