Update app.py
Browse files
app.py
CHANGED
@@ -116,9 +116,11 @@ if st.button("Predict"):
|
|
116 |
"importance_of_record": float(importance_of_record)
|
117 |
}
|
118 |
|
|
|
|
|
119 |
|
120 |
# Send a POST request to the FastAPI server
|
121 |
-
response = requests.post("https://rasmodev-income-prediction-fastapi.hf.space/predict/", json=user_input)
|
122 |
|
123 |
# Check if the request was successful
|
124 |
if response.status_code == 200:
|
|
|
116 |
"importance_of_record": float(importance_of_record)
|
117 |
}
|
118 |
|
119 |
+
# Specify the port that the FastAPI API is running on
|
120 |
+
api_port = 7860
|
121 |
|
122 |
# Send a POST request to the FastAPI server
|
123 |
+
response = requests.post("https://rasmodev-income-prediction-fastapi.hf.space/predict/", json=user_input, port=api_port)
|
124 |
|
125 |
# Check if the request was successful
|
126 |
if response.status_code == 200:
|