Spaces:
Sleeping
Sleeping
引数
Browse files
main.py
CHANGED
@@ -37,6 +37,7 @@ origins = [
|
|
37 |
"http://localhost",
|
38 |
"http://localhost:5173", # Default URL for Vite React dev server
|
39 |
"https://board-recognizer-30ib6veo9-wai572s-projects.vercel.app", # Your deployed frontend
|
|
|
40 |
]
|
41 |
app.add_middleware(
|
42 |
CORSMiddleware,
|
@@ -72,7 +73,8 @@ def load_dependencies():
|
|
72 |
|
73 |
|
74 |
@app.post("/analyze/")
|
75 |
-
async def analyze_image(image_paths
|
|
|
76 |
global trocr_pipeline
|
77 |
# モデルが読み込まれているか確認
|
78 |
if trocr_pipeline is None:
|
|
|
37 |
"http://localhost",
|
38 |
"http://localhost:5173", # Default URL for Vite React dev server
|
39 |
"https://board-recognizer-30ib6veo9-wai572s-projects.vercel.app", # Your deployed frontend
|
40 |
+
"https://board-recognizer.vercel.app",
|
41 |
]
|
42 |
app.add_middleware(
|
43 |
CORSMiddleware,
|
|
|
73 |
|
74 |
|
75 |
@app.post("/analyze/")
|
76 |
+
async def analyze_image(file: image_paths = []):
|
77 |
+
progress = print
|
78 |
global trocr_pipeline
|
79 |
# モデルが読み込まれているか確認
|
80 |
if trocr_pipeline is None:
|