Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -10,7 +10,10 @@ class ImageRequest(BaseModel): # Новая модель для запроса
|
|
| 10 |
size: str = "1_1_HD"
|
| 11 |
is_public: bool = False
|
| 12 |
|
|
|
|
|
|
|
| 13 |
@app.post("/generate-image")
|
|
|
|
| 14 |
async def generate_image(request: ImageRequest):
|
| 15 |
url = "https://api.fastflux.co/v1/images/generate"
|
| 16 |
headers = {"Content-Type": "application/json"}
|
|
|
|
| 10 |
size: str = "1_1_HD"
|
| 11 |
is_public: bool = False
|
| 12 |
|
| 13 |
+
app = FastAPI(lifespan=lifespan)
|
| 14 |
+
|
| 15 |
@app.post("/generate-image")
|
| 16 |
+
|
| 17 |
async def generate_image(request: ImageRequest):
|
| 18 |
url = "https://api.fastflux.co/v1/images/generate"
|
| 19 |
headers = {"Content-Type": "application/json"}
|