Spaces:
Paused
Paused
Update main.py
Browse filesdalle3xl update
main.py
CHANGED
|
@@ -112,6 +112,7 @@ app = FastAPI(
|
|
| 112 |
docs_url="/"
|
| 113 |
)
|
| 114 |
|
|
|
|
| 115 |
contact_support = """
|
| 116 |
We are aware that this service is currently offline. This seems to be caused by the API
|
| 117 |
We are investigating and doing our best to get things back online as soon as possible. Thank you for your patience
|
|
@@ -268,7 +269,7 @@ def dalle_3xl(
|
|
| 268 |
"strength": item.strength
|
| 269 |
}
|
| 270 |
headers = {"Authorization": f"Bearer {HUGGING_TOKEN}"}
|
| 271 |
-
response = requests.post(API_URL, headers=headers, json=payload)
|
| 272 |
response.raise_for_status()
|
| 273 |
except requests.exceptions.RequestException:
|
| 274 |
raise HTTPException(
|
|
|
|
| 112 |
docs_url="/"
|
| 113 |
)
|
| 114 |
|
| 115 |
+
timeout = 100
|
| 116 |
contact_support = """
|
| 117 |
We are aware that this service is currently offline. This seems to be caused by the API
|
| 118 |
We are investigating and doing our best to get things back online as soon as possible. Thank you for your patience
|
|
|
|
| 269 |
"strength": item.strength
|
| 270 |
}
|
| 271 |
headers = {"Authorization": f"Bearer {HUGGING_TOKEN}"}
|
| 272 |
+
response = requests.post(API_URL, headers=headers, json=payload, timeout=timeout)
|
| 273 |
response.raise_for_status()
|
| 274 |
except requests.exceptions.RequestException:
|
| 275 |
raise HTTPException(
|