Spaces:
Runtime error
Runtime error
Upload folder using huggingface_hub
Browse files- backend/main.py +4 -4
- frontend/next.config.ts +1 -1
backend/main.py
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
from fastapi import FastAPI, UploadFile, File, BackgroundTasks, HTTPException, WebSocket, WebSocketDisconnect, Depends
|
| 2 |
from fastapi.middleware.cors import CORSMiddleware
|
| 3 |
from pydantic import BaseModel
|
| 4 |
import pandas as pd
|
| 5 |
import asyncio
|
| 6 |
-
import sys
|
| 7 |
-
import os
|
| 8 |
import random
|
| 9 |
import shap
|
| 10 |
import database as db
|
|
@@ -19,8 +21,6 @@ try:
|
|
| 19 |
warnings.filterwarnings("ignore", category=InconsistentVersionWarning)
|
| 20 |
except ImportError:
|
| 21 |
pass
|
| 22 |
-
|
| 23 |
-
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
|
| 24 |
from preprocessing import preprocess_data
|
| 25 |
from export import generate_c_code
|
| 26 |
from inference import evaluate
|
|
|
|
| 1 |
+
import sys
|
| 2 |
+
import os
|
| 3 |
+
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
|
| 4 |
+
|
| 5 |
from fastapi import FastAPI, UploadFile, File, BackgroundTasks, HTTPException, WebSocket, WebSocketDisconnect, Depends
|
| 6 |
from fastapi.middleware.cors import CORSMiddleware
|
| 7 |
from pydantic import BaseModel
|
| 8 |
import pandas as pd
|
| 9 |
import asyncio
|
|
|
|
|
|
|
| 10 |
import random
|
| 11 |
import shap
|
| 12 |
import database as db
|
|
|
|
| 21 |
warnings.filterwarnings("ignore", category=InconsistentVersionWarning)
|
| 22 |
except ImportError:
|
| 23 |
pass
|
|
|
|
|
|
|
| 24 |
from preprocessing import preprocess_data
|
| 25 |
from export import generate_c_code
|
| 26 |
from inference import evaluate
|
frontend/next.config.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { NextConfig } from "next";
|
|
| 2 |
|
| 3 |
const nextConfig: NextConfig = {
|
| 4 |
output: "export",
|
| 5 |
-
|
| 6 |
images: {
|
| 7 |
unoptimized: true, // Required for static export
|
| 8 |
}
|
|
|
|
| 2 |
|
| 3 |
const nextConfig: NextConfig = {
|
| 4 |
output: "export",
|
| 5 |
+
basePath: "/TinyML-Heart-Health-Monitoring-Dashboard", // Uncomment if hosted on a subpath in GitHub Pages
|
| 6 |
images: {
|
| 7 |
unoptimized: true, // Required for static export
|
| 8 |
}
|