Muhammad Waqas commited on
Commit
f9bfec2
·
1 Parent(s): ab345d8

Added: Generate image to video

Browse files
Files changed (1) hide show
  1. app.py +5 -0
app.py CHANGED
@@ -14,6 +14,8 @@ from PIL import Image
14
  from werkzeug.utils import secure_filename
15
  import urllib.parse
16
  import urllib.request
 
 
17
 
18
  # Load environment variables from the .env file
19
  load_dotenv()
@@ -21,6 +23,9 @@ load_dotenv()
21
  # Initialize Flask app
22
  app = Flask(__name__)
23
 
 
 
 
24
  ALLOWED_EXTENSIONS = {'jpg', 'jpeg', 'png', 'webp'} # Define supported image types
25
 
26
  # Set server and websocket addresses from environment variables
 
14
  from werkzeug.utils import secure_filename
15
  import urllib.parse
16
  import urllib.request
17
+ import time
18
+ from werkzeug.serving import WSGIRequestHandler
19
 
20
  # Load environment variables from the .env file
21
  load_dotenv()
 
23
  # Initialize Flask app
24
  app = Flask(__name__)
25
 
26
+ # Increase timeout limit
27
+ WSGIRequestHandler.timeout = 3600 # Set to 60 minutes
28
+
29
  ALLOWED_EXTENSIONS = {'jpg', 'jpeg', 'png', 'webp'} # Define supported image types
30
 
31
  # Set server and websocket addresses from environment variables