Amodit commited on
Commit
3aee12f
·
1 Parent(s): 31f292c

Fix Pydantic model conversion and remove Railway dependency

Browse files
Files changed (2) hide show
  1. main.py +1 -1
  2. main_streamlit.py +3 -3
main.py CHANGED
@@ -378,7 +378,7 @@ async def find_schemes(request: SchemeRequest):
378
  return ApiResponse(
379
  success=True,
380
  message="Schemes found successfully",
381
- data=response
382
  )
383
  except Exception as e:
384
  logger.error(f"Scheme search failed: {str(e)}")
 
378
  return ApiResponse(
379
  success=True,
380
  message="Schemes found successfully",
381
+ data=response.model_dump() if hasattr(response, 'model_dump') else response
382
  )
383
  except Exception as e:
384
  logger.error(f"Scheme search failed: {str(e)}")
main_streamlit.py CHANGED
@@ -8,9 +8,9 @@ load_dotenv()
8
  st.set_page_config(layout="wide", page_title="Jan-Contract Unified Assistant", page_icon="⚖️")
9
 
10
  # Backend Configuration
11
- # Default to the production Railway URL
12
- PRODUCTION_URL = "https://jan-contract-production.up.railway.app"
13
- default_url = os.getenv("BACKEND_URL", PRODUCTION_URL)
14
 
15
  with st.sidebar:
16
  with st.expander("⚙️ Connection Settings"):
 
8
  st.set_page_config(layout="wide", page_title="Jan-Contract Unified Assistant", page_icon="⚖️")
9
 
10
  # Backend Configuration
11
+ # Default to local server (run with: python -m uvicorn main:app --port 8000)
12
+ LOCAL_URL = "http://localhost:8000"
13
+ default_url = os.getenv("BACKEND_URL", LOCAL_URL)
14
 
15
  with st.sidebar:
16
  with st.expander("⚙️ Connection Settings"):