-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
30 lines (26 loc) · 980 Bytes
/
main.py
File metadata and controls
30 lines (26 loc) · 980 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
"""
Main entry point for the Background Removal Tool
Run this file to start the FastAPI backend server
"""
if __name__ == "__main__":
import uvicorn
from app.config import settings
print("=" * 60)
print("🎨 Background Removal Tool - Starting Server")
print("=" * 60)
print("\n📦 Loading U²-Net model...")
print("⚠️ Make sure you have downloaded the model weights!")
print(" Run: python app/utils/download_model.py")
print("=" * 60)
print(f"\n🚀 Server will start at: http://{settings.HOST}:{settings.PORT}")
print(f"📚 API Docs: http://{settings.HOST}:{settings.PORT}/docs")
print("🌐 Open client/index.html in your browser to use the UI")
print("\n⏸️ Press CTRL+C to stop the server")
print("=" * 60 + "\n")
uvicorn.run(
"app.main:app",
host=settings.HOST,
port=settings.PORT,
reload=settings.RELOAD,
log_level=settings.LOG_LEVEL.lower()
)