Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -2298,7 +2298,14 @@ def process_pdf():
|
|
2298 |
# Instead of returning the local path, return a URL to the download endpoint
|
2299 |
download_url = f"https:/webashalarforml-scratch-vlm-v1-2.hf.space/download_sb3/{project_id}"
|
2300 |
print(f"DOWNLOAD_URL: {download_url}")
|
2301 |
-
return jsonify({"message": "Procesed PDF and Game sb3 generated successfully", "project_id": project_id, "download_url": download_url})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2302 |
else:
|
2303 |
return jsonify(error="Failed to create SB3 archive"), 500
|
2304 |
|
|
|
2298 |
# Instead of returning the local path, return a URL to the download endpoint
|
2299 |
download_url = f"https:/webashalarforml-scratch-vlm-v1-2.hf.space/download_sb3/{project_id}"
|
2300 |
print(f"DOWNLOAD_URL: {download_url}")
|
2301 |
+
# return jsonify({"message": "Procesed PDF and Game sb3 generated successfully", "project_id": project_id, "download_url": download_url})
|
2302 |
+
return jsonify({
|
2303 |
+
"message": "✅ PDF processed successfully",
|
2304 |
+
"output_json": "output_path",
|
2305 |
+
"sprites": "result",
|
2306 |
+
"project_output_json": "project_output",
|
2307 |
+
"test_url": download_url
|
2308 |
+
})
|
2309 |
else:
|
2310 |
return jsonify(error="Failed to create SB3 archive"), 500
|
2311 |
|