Spaces:
Sleeping
Sleeping
fix (app): adapted to app directory
Browse files- .gitignore +1 -0
- server_factory_predictor.py +2 -2
.gitignore
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
__pycache__/
|
server_factory_predictor.py
CHANGED
|
@@ -12,7 +12,7 @@ from factory_predictor import FactoryPredictor
|
|
| 12 |
app = FastAPI()
|
| 13 |
|
| 14 |
# Serve static files
|
| 15 |
-
app.mount("/static", StaticFiles(directory="static"), name="static")
|
| 16 |
|
| 17 |
app.add_middleware(
|
| 18 |
CORSMiddleware,
|
|
@@ -35,7 +35,7 @@ def root():
|
|
| 35 |
|
| 36 |
@app.get("/editor/")
|
| 37 |
def get_editor():
|
| 38 |
-
return FileResponse(os.path.join("static", "editor", "index.html"))
|
| 39 |
|
| 40 |
def train_model():
|
| 41 |
global training_status
|
|
|
|
| 12 |
app = FastAPI()
|
| 13 |
|
| 14 |
# Serve static files
|
| 15 |
+
app.mount("/app/static", StaticFiles(directory="static"), name="static")
|
| 16 |
|
| 17 |
app.add_middleware(
|
| 18 |
CORSMiddleware,
|
|
|
|
| 35 |
|
| 36 |
@app.get("/editor/")
|
| 37 |
def get_editor():
|
| 38 |
+
return FileResponse(os.path.join("app", "static", "editor", "index.html"))
|
| 39 |
|
| 40 |
def train_model():
|
| 41 |
global training_status
|