Spaces:
Runtime error
Runtime error
Upload response.py
Browse files
src/backend/api/models/response.py
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing import List
|
| 2 |
+
|
| 3 |
+
from pydantic import BaseModel
|
| 4 |
+
|
| 5 |
+
|
| 6 |
+
class StableDiffusionResponse(BaseModel):
|
| 7 |
+
"""
|
| 8 |
+
Stable diffusion response model
|
| 9 |
+
|
| 10 |
+
Attributes:
|
| 11 |
+
images (List[str]): List of JPEG image as base64 encoded
|
| 12 |
+
latency (float): Latency in seconds
|
| 13 |
+
error (str): Error message if any
|
| 14 |
+
"""
|
| 15 |
+
|
| 16 |
+
images: List[str]
|
| 17 |
+
latency: float
|
| 18 |
+
error: str = ""
|