Update app.py
Browse files
app.py
CHANGED
|
@@ -15,7 +15,6 @@ from models import (
|
|
| 15 |
ModelInfo
|
| 16 |
)
|
| 17 |
from image_generator import image_generator
|
| 18 |
-
from config import config
|
| 19 |
|
| 20 |
# Setup logging
|
| 21 |
logging.basicConfig(level=logging.INFO)
|
|
@@ -49,7 +48,7 @@ app.add_middleware(
|
|
| 49 |
)
|
| 50 |
|
| 51 |
# Mount static files for serving images
|
| 52 |
-
app.mount("/images", StaticFiles(directory=
|
| 53 |
|
| 54 |
|
| 55 |
@app.get("/")
|
|
@@ -151,8 +150,8 @@ async def global_exception_handler(request, exc):
|
|
| 151 |
if __name__ == "__main__":
|
| 152 |
uvicorn.run(
|
| 153 |
"main:app",
|
| 154 |
-
host=
|
| 155 |
-
port=
|
| 156 |
reload=True,
|
| 157 |
log_level="info"
|
| 158 |
)
|
|
|
|
| 15 |
ModelInfo
|
| 16 |
)
|
| 17 |
from image_generator import image_generator
|
|
|
|
| 18 |
|
| 19 |
# Setup logging
|
| 20 |
logging.basicConfig(level=logging.INFO)
|
|
|
|
| 48 |
)
|
| 49 |
|
| 50 |
# Mount static files for serving images
|
| 51 |
+
app.mount("/images", StaticFiles(directory="images"), name="images")
|
| 52 |
|
| 53 |
|
| 54 |
@app.get("/")
|
|
|
|
| 150 |
if __name__ == "__main__":
|
| 151 |
uvicorn.run(
|
| 152 |
"main:app",
|
| 153 |
+
host="0.0.0.0",
|
| 154 |
+
port=8000,
|
| 155 |
reload=True,
|
| 156 |
log_level="info"
|
| 157 |
)
|