Ritesh1035 commited on
Commit
239f0cc
·
verified ·
1 Parent(s): 9a8ed3e

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +2 -4
src/streamlit_app.py CHANGED
@@ -21,8 +21,8 @@ st.set_page_config(
21
  initial_sidebar_state="expanded"
22
  )
23
 
24
- # Direct backend URL - no environment variables needed
25
- API_BASE_URL = "https://ritesh1035-fp-backend.hf.space"
26
 
27
  # Initialize session state for authentication - with proper persistence
28
  def init_session_state():
@@ -54,8 +54,6 @@ def init_session_state():
54
  if 'user_email' not in st.session_state:
55
  st.session_state.user_email = None
56
 
57
- # No longer needed - using radio toggle instead
58
-
59
  # Initialize session state
60
  init_session_state()
61
 
 
21
  initial_sidebar_state="expanded"
22
  )
23
 
24
+ # Get backend URL from environment variable (HF Secrets)
25
+ API_BASE_URL = os.getenv("API_BASE_URL", "https://ritesh1035-fp-backend.hf.space")
26
 
27
  # Initialize session state for authentication - with proper persistence
28
  def init_session_state():
 
54
  if 'user_email' not in st.session_state:
55
  st.session_state.user_email = None
56
 
 
 
57
  # Initialize session state
58
  init_session_state()
59