sreepathi-ravikumar commited on
Commit
f0758ac
·
verified ·
1 Parent(s): 15c20c5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -7
app.py CHANGED
@@ -229,10 +229,12 @@ def generate_video():
229
  try:
230
  raw_data = request.get_json()
231
  raw_body=raw_data.get("jsondata" , '')
232
- print(f"Raw body length: {len(raw_body)}")
233
- print(f"First 200 chars: {raw_body[:200]}")
234
-
235
- lst = str(raw_body).split("&&&&")
 
 
236
  cleaned = re.sub(r'(\d)\s*\.\s*(\d)', r'\1.\2', lst[0])
237
  nlist = ast.literal_eval(cleaned)
238
  datalst=[]
@@ -254,8 +256,8 @@ def generate_video():
254
  "equation_size": 42,
255
  "title_size": 48
256
  },
257
- "slides":datalst}
258
- # Now proceed with video generation using 'data'
259
  print(json.dumps(data, indent=2)) # For debugging
260
  # ✅ Final validation
261
  if "slides" not in data or not data["slides"]:
@@ -342,9 +344,10 @@ def generate_video():
342
  shutil.rmtree(temp_work_dir)
343
  print("Cleaned up temp directory")
344
  except Exception as e:
345
- print(f"Failed to clean temp dir: {e}")
346
 
347
  # Return video file as blob
 
348
  return send_file(
349
  output_path,
350
  mimetype='video/mp4',
 
229
  try:
230
  raw_data = request.get_json()
231
  raw_body=raw_data.get("jsondata" , '')
232
+ #print(f"Raw body length: {len(raw_body)}")
233
+ #print(f"First 200 chars: {raw_body[:200]}")
234
+ if 5>1:
235
+ print(raw_body)
236
+
237
+ ''' lst = raw_body.split("&&&&")
238
  cleaned = re.sub(r'(\d)\s*\.\s*(\d)', r'\1.\2', lst[0])
239
  nlist = ast.literal_eval(cleaned)
240
  datalst=[]
 
256
  "equation_size": 42,
257
  "title_size": 48
258
  },
259
+ "slides":datalst}'''
260
+ '''# Now proceed with video generation using 'data'
261
  print(json.dumps(data, indent=2)) # For debugging
262
  # ✅ Final validation
263
  if "slides" not in data or not data["slides"]:
 
344
  shutil.rmtree(temp_work_dir)
345
  print("Cleaned up temp directory")
346
  except Exception as e:
347
+ print(f"Failed to clean temp dir: {e}")'''
348
 
349
  # Return video file as blob
350
+ output_path="https://videos.pexels.com/video-files/3173312/3173312-uhd_2560_1440_30fps.mp4"
351
  return send_file(
352
  output_path,
353
  mimetype='video/mp4',