File size: 1,410 Bytes
f1b2ef2
 
080c0ac
af85b79
f419a09
7b86905
 
 
af85b79
ca2a4e0
efac16f
7f2257d
f1b2ef2
 
 
ca2a4e0
f1b2ef2
 
 
 
 
 
 
7f2257d
f1b2ef2
 
07da480
d2a2d86
d68b387
ed57be9
f1b2ef2
 
 
 
ed57be9
8cb2d8e
ed57be9
 
 
 
 
51c84d5
8cb2d8e
 
ed57be9
 
07da480
 
 
 
ca2a4e0
 
6c850b1
f419a09
2b4f9c7
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware
from routers import (sdxl_text_to_image,painting)
import logfire
import uvicorn 



logfire.configure(pydantic_plugin=logfire.PydanticPlugin(record='all'))







app = FastAPI(openapi_url='/api/v1/product-diffusion/openapi.json',docs_url='/api/v1/product_diffusion/docs')
app.add_middleware(
    CORSMiddleware,
    allow_origins = ["*"],
    allow_methods = ["*"],
    allow_headers=["*"],
    allow_credentials = True
       
)

app.include_router(sdxl_text_to_image.router, prefix='/api/v1/product-diffusion')
app.include_router(painting.router,prefix='/api/v1/product-diffusion')
logfire.instrument_fastapi(app)



@app.get('/')
async def root():
    return {
        'message': 'Welcome to the PICPILOT API Page , Develop Visual Stories for your Brand',
        'description': 'This API provides endpoints for accessing and managing product diffusion data.',
        'version': '1.0.0',
        'author': 'Vikramjeet Singh',
        'contact': {
            'email': 'singh.vikram.1782000@gmail.com',
            'github': 'https://github.com/vikramxD',
            'website': 'https://vikramxd.github.io',
            'peerlist': 'https://peerlist.io/vikramxd'
        },
        'license': 'MIT',
    }
    
@app.get("/health")
def check_health():
    return {"status": "ok"}



uvicorn.run(app, host='0.0.0.0', port=7860)