Skip to content

Commit f9ad8c9

Browse files
Update streamlit_app.py
1 parent 87418e6 commit f9ad8c9

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

streamlit_app.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,8 @@
4343

4444
try:
4545
# Make API request based on disease type
46-
if disease_type == "Skin Cancer":
47-
response = requests.post("http://localhost:8000/predict/skin-cancer", files=files)
48-
else: # Pneumonia
49-
response = requests.post("http://localhost:8000/predict/pneumonia", files=files)
46+
if disease_type:
47+
response = requests.post("http://localhost:8000/api/v1/predict", files=files) # Updated endpoint
5048

5149
if response.status_code == 200:
5250
result = response.json()
@@ -59,4 +57,4 @@
5957

6058
except requests.exceptions.RequestException as e:
6159
st.error(f"Error connecting to the server: {str(e)}")
62-
st.info("Make sure the FastAPI backend is running on http://localhost:8000")
60+
st.info("Make sure the FastAPI backend is running on http://localhost:8000")

0 commit comments

Comments
 (0)