Spaces:
Configuration error
Configuration error
Fix HF API ERROR
Browse files
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:
|
| 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 |
-
|
|
|
|
|
|
| 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")))
|