Commit
·
f82a622
1
Parent(s):
077ba3b
added Final
Browse files- frontend/src/App.jsx +2 -9
frontend/src/App.jsx
CHANGED
|
@@ -17,15 +17,8 @@ const App = () => {
|
|
| 17 |
const [loading, setLoading] = useState(false);
|
| 18 |
const [error, setError] = useState('');
|
| 19 |
|
| 20 |
-
//
|
| 21 |
-
|
| 22 |
-
// const API_URL = import.meta.env.VITE_API_URL;
|
| 23 |
-
const API_URL = import.meta.env.VITE_API_URL || 'https://mri-diagnosis-app.hf.space';
|
| 24 |
-
|
| 25 |
-
if (!API_URL) {
|
| 26 |
-
// Log a severe error if the necessary environment variable is missing
|
| 27 |
-
console.error("VITE_API_URL is not set. API communication will fail.");
|
| 28 |
-
}
|
| 29 |
|
| 30 |
const CLASS_INFO = useMemo(() => ({
|
| 31 |
glioma: { name: "Glioma Tumor (Malignant)", color: "#dc2626", bg: "#fef2f2", icon: <IconAlertTriangle className="icon-sm" /> },
|
|
|
|
| 17 |
const [loading, setLoading] = useState(false);
|
| 18 |
const [error, setError] = useState('');
|
| 19 |
|
| 20 |
+
// API URL - use relative path since frontend and backend are served together
|
| 21 |
+
const API_URL = ''; // Empty string means same origin
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
|
| 23 |
const CLASS_INFO = useMemo(() => ({
|
| 24 |
glioma: { name: "Glioma Tumor (Malignant)", color: "#dc2626", bg: "#fef2f2", icon: <IconAlertTriangle className="icon-sm" /> },
|