soupstick commited on
Commit
b7f663f
·
1 Parent(s): f97de8c

Fix HF API ERROR

Browse files
Files changed (2) hide show
  1. app.py +1 -1
  2. serve.py +3 -2
app.py CHANGED
@@ -339,7 +339,7 @@ api_url = st.sidebar.text_input(
339
  )
340
 
341
  # Agent API URL for metric generation
342
- agent_api_url = os.getenv("AGENT_API_URL", "http://localhost:8501")
343
 
344
  st.title("Marketplace Intelligence — Upload → NL→SQL → Dashboard")
345
  if not dfs:
 
339
  )
340
 
341
  # Agent API URL for metric generation
342
+ agent_api_url = os.getenv("AGENT_API_URL", "http://localhost:7861")
343
 
344
  st.title("Marketplace Intelligence — Upload → NL→SQL → Dashboard")
345
  if not dfs:
serve.py CHANGED
@@ -61,5 +61,6 @@ def generate_metric(payload: dict):
61
 
62
  if __name__ == "__main__":
63
  import uvicorn
64
-
65
- uvicorn.run(api_app, host="0.0.0.0", port=int(os.getenv("PORT", "8501")))
 
 
61
 
62
  if __name__ == "__main__":
63
  import uvicorn
64
+
65
+ # Run FastAPI on different port to avoid conflict with Streamlit
66
+ uvicorn.run(api_app, host="0.0.0.0", port=int(os.getenv("FASTAPI_PORT", "7861")))