Ritesh1035 commited on
Commit
808e74b
·
verified ·
1 Parent(s): e0b1d26

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +3 -3
src/streamlit_app.py CHANGED
@@ -10,7 +10,7 @@ st.set_page_config(
10
  )
11
 
12
  # FastAPI base URL
13
- BASE_URL = "https://ritesh1035-cms-apis.hf.space"
14
 
15
  # Helper functions
16
  def make_request(method, endpoint, data=None):
@@ -28,7 +28,7 @@ def make_request(method, endpoint, data=None):
28
 
29
  return response
30
  except requests.exceptions.ConnectionError:
31
- st.error("Cannot connect to FastAPI server. Make sure it's running on https://ritesh1035-cms-apis.hf.space")
32
  return None
33
 
34
  # Main title
@@ -83,7 +83,7 @@ elif operation == "Add Customer":
83
  else:
84
  # Auto-generate ID based on existing customers count
85
  try:
86
- existing_customers = requests.get("https://ritesh1035-cms-apis.hf.space/Customer").json()
87
  if existing_customers:
88
  max_id = max(customer.get('id', 0) for customer in existing_customers)
89
  customer_id = max_id + 1
 
10
  )
11
 
12
  # FastAPI base URL
13
+ BASE_URL = "https://ritesh1035-db-backend.hf.space"
14
 
15
  # Helper functions
16
  def make_request(method, endpoint, data=None):
 
28
 
29
  return response
30
  except requests.exceptions.ConnectionError:
31
+ st.error("Cannot connect to FastAPI server. Make sure it's running on https://ritesh1035-db-backend.hf.space")
32
  return None
33
 
34
  # Main title
 
83
  else:
84
  # Auto-generate ID based on existing customers count
85
  try:
86
+ existing_customers = requests.get("https://ritesh1035-db-backend.hf.space").json()
87
  if existing_customers:
88
  max_id = max(customer.get('id', 0) for customer in existing_customers)
89
  customer_id = max_id + 1