prthm11 commited on
Commit
c814274
·
verified ·
1 Parent(s): b204c0d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -2110,6 +2110,7 @@ def create_sb3_archive(project_folder, project_id):
2110
  """
2111
  # output_filename = os.path.join("outputs", project_id)
2112
  output_filename = OUTPUT_DIR / project_id
 
2113
  zip_path = None
2114
  sb3_path = None
2115
  try:
@@ -2251,7 +2252,8 @@ def process_pdf():
2251
  if sb3_file_path:
2252
  logger.info(f"Successfully created SB3 file: {sb3_file_path}")
2253
  # Instead of returning the local path, return a URL to the download endpoint
2254
- download_url = f"https://prthm11-scratch-vlm-v1.hf.space//download_sb3//{project_id}"
 
2255
  return jsonify({"message": "Procesed PDF and Game sb3 generated successfully", "project_id": project_id, "download_url": download_url})
2256
  else:
2257
  return jsonify(error="Failed to create SB3 archive"), 500
 
2110
  """
2111
  # output_filename = os.path.join("outputs", project_id)
2112
  output_filename = OUTPUT_DIR / project_id
2113
+ # output_filename = GEN_PROJECT_DIR / project_id
2114
  zip_path = None
2115
  sb3_path = None
2116
  try:
 
2252
  if sb3_file_path:
2253
  logger.info(f"Successfully created SB3 file: {sb3_file_path}")
2254
  # Instead of returning the local path, return a URL to the download endpoint
2255
+ download_url = f"https://prthm11-scratch-vlm-v1.hf.space/download_sb3/{project_id}"
2256
+ print(f"DOWNLOAD_URL: {download_url}")
2257
  return jsonify({"message": "Procesed PDF and Game sb3 generated successfully", "project_id": project_id, "download_url": download_url})
2258
  else:
2259
  return jsonify(error="Failed to create SB3 archive"), 500