Spaces:
Running
Running
Revert "app.mount"
Browse filesThis reverts commit a72812fb225a3c9bc0843ce856ac5d1a54e99c1d.
main.py
CHANGED
@@ -7,7 +7,7 @@ from typing import List
|
|
7 |
|
8 |
import cv2
|
9 |
import numpy as np
|
10 |
-
from fastapi import FastAPI, HTTPException, Request, UploadFile
|
11 |
from fastapi.middleware.cors import CORSMiddleware
|
12 |
from fastapi.responses import JSONResponse
|
13 |
from PIL import Image
|
@@ -47,7 +47,6 @@ app.add_middleware(
|
|
47 |
allow_methods=["*"], # Allows all methods (GET, POST, etc.)
|
48 |
allow_headers=["*"], # Allows all headers
|
49 |
)
|
50 |
-
app.mount("/", staticfiles.StaticFiles(directory=".",html=True))
|
51 |
|
52 |
# AIモデルとテンプレートを起動時に読み込む
|
53 |
trocr_pipeline = None # load_model()のロジックをここに
|
|
|
7 |
|
8 |
import cv2
|
9 |
import numpy as np
|
10 |
+
from fastapi import FastAPI, HTTPException, Request, UploadFile
|
11 |
from fastapi.middleware.cors import CORSMiddleware
|
12 |
from fastapi.responses import JSONResponse
|
13 |
from PIL import Image
|
|
|
47 |
allow_methods=["*"], # Allows all methods (GET, POST, etc.)
|
48 |
allow_headers=["*"], # Allows all headers
|
49 |
)
|
|
|
50 |
|
51 |
# AIモデルとテンプレートを起動時に読み込む
|
52 |
trocr_pipeline = None # load_model()のロジックをここに
|