Ufoptg commited on
Commit
7da3c2e
1 Parent(s): 075b84f

Update main.py

Browse files

dalle3xl update

Files changed (1) hide show
  1. main.py +2 -1
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(