File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change 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 ()
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" )
You can’t perform that action at this time.
0 commit comments