WebashalarForML commited on
Commit
4e706fc
·
verified ·
1 Parent(s): 023e864

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -2168,7 +2168,7 @@ def create_sb3_archive(project_folder, project_id):
2168
  os.remove(zip_path)
2169
  if sb3_path and os.path.exists(sb3_path):
2170
  os.remove(sb3_path)
2171
- return None
2172
 
2173
 
2174
  @app.route('/')
@@ -2292,7 +2292,7 @@ def process_pdf():
2292
  if sb3_file_path:
2293
  logger.info(f"Successfully created SB3 file: {sb3_file_path}")
2294
  # Instead of returning the local path, return a URL to the download endpoint
2295
- download_url = f"https://prthm11-scratch-vlm-v1.hf.space/download_sb3/{project_id}"
2296
  print(f"DOWNLOAD_URL: {download_url}")
2297
  return jsonify({"message": "Procesed PDF and Game sb3 generated successfully", "project_id": project_id, "download_url": download_url})
2298
  else:
 
2168
  os.remove(zip_path)
2169
  if sb3_path and os.path.exists(sb3_path):
2170
  os.remove(sb3_path)
2171
+ return sb3_path
2172
 
2173
 
2174
  @app.route('/')
 
2292
  if sb3_file_path:
2293
  logger.info(f"Successfully created SB3 file: {sb3_file_path}")
2294
  # Instead of returning the local path, return a URL to the download endpoint
2295
+ download_url = f"https:/webashalarforml-scratch-vlm-v1-2.hf.space/download_sb3/{project_id}"
2296
  print(f"DOWNLOAD_URL: {download_url}")
2297
  return jsonify({"message": "Procesed PDF and Game sb3 generated successfully", "project_id": project_id, "download_url": download_url})
2298
  else: