You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Anvil, Form TestForm should update get_test_url function to get the served the correct images.
Related code in _run.py:
# TEST IMAGE@app.route("/test/<angle>/<image>")defget_test_image(angle: str, image: str) ->Union[str, Response]:
""" Retrieve an image from the test directory. Args: angle (str): The angle of the camera. image (str): The name of the image file. Returns: Union[str, Response]: The image file or an error message. """directory=os.path.join(
os.getcwd(), "data_warehouse", "dataset", object_name, "test", "good", angle
)
full_path=os.path.join(directory, image)
print("Full path to image:", full_path)
# Add a cache-busting query parametercache_buster=request.args.get("cb", int(time.time()))
ifos.path.isfile(os.path.join(directory, image)):
response=send_from_directory(directory, image)
# Modify the cache control headersresponse.headers["Cache-Control"] ="no-store"returnresponseelse:
return"File not found", 404```
The text was updated successfully, but these errors were encountered:
In Anvil, Form TestForm should update get_test_url function to get the served the correct images.
Related code in _run.py:
The text was updated successfully, but these errors were encountered: