Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
@@ -53,8 +53,8 @@ logger.info("Finished loading models!!!")
|
|
53 |
# Initialize FastAPI app
|
54 |
app = FastAPI()
|
55 |
|
56 |
-
#
|
57 |
-
request_queue = asyncio.Queue()
|
58 |
|
59 |
# Define a response model for the processed image
|
60 |
class ProcessResponse(BaseModel):
|
|
|
53 |
# Initialize FastAPI app
|
54 |
app = FastAPI()
|
55 |
|
56 |
+
MAX_QUEUE_SIZE = 10 # Set a reasonable limit based on your system capacity
|
57 |
+
request_queue = asyncio.Queue(maxsize=MAX_QUEUE_SIZE)
|
58 |
|
59 |
# Define a response model for the processed image
|
60 |
class ProcessResponse(BaseModel):
|