Nifemi Alpine Durin commited on
Commit
3f5b005
·
1 Parent(s): b9de81a

add timeout

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -21,7 +21,11 @@ def generate_image(campaign_details):
21
  }
22
 
23
  # Make the API call
24
- response = requests.post(API_URL + "/generate_graphic", json=data)
 
 
 
 
25
 
26
  # Ensure the API call was successful
27
  if response.status_code != 200:
 
21
  }
22
 
23
  # Make the API call
24
+ response = requests.post(
25
+ API_URL + "/generate_graphic",
26
+ json=data,
27
+ timeout=900 # Timeout set to 15 minutes (900 seconds)
28
+ )
29
 
30
  # Ensure the API call was successful
31
  if response.status_code != 200: