Download scripts/debug_vton.py from Mohansree/bsure-api: direct link, hf CLI and curl.
- Browser
- Download file 957 Bytes
-
https://huggingface.co/spaces/Mohansree/bsure-api/resolve/main/scripts/debug_vton.py
- Command line
-
hf download hf://spaces/Mohansree/bsure-api/scripts/debug_vton.py
-
curl -L -o debug_vton.py https://huggingface.co/spaces/Mohansree/bsure-api/resolve/main/scripts/debug_vton.py
957 Bytes
| import os | |
| import glob | |
| def inspect_vton_results(): | |
| base_dir = os.path.join(os.getcwd(), "static", "generated") | |
| print(f"Checking dir: {base_dir}") | |
| if not os.path.exists(base_dir): | |
| print("Directory does not exist!") | |
| return | |
| files = glob.glob(os.path.join(base_dir, "*")) | |
| files.sort(key=os.path.getmtime, reverse=True) | |
| print(f"Found {len(files)} files.") | |
| if not files: | |
| print("No generated files found.") | |
| return | |
| latest_file = files[0] | |
| print(f"Latest file: {os.path.basename(latest_file)}") | |
| print(f"Size: {os.path.getsize(latest_file)} bytes") | |
| with open(latest_file, "rb") as f: | |
| header = f.read(100) | |
| print(f"Header (hex): {header.hex()}") | |
| try: | |
| print(f"Header (text): {header.decode('utf-8')}") | |
| except: | |
| print("Header is binary (likely valid image data)") | |
| if __name__ == "__main__": | |
| inspect_vton_results() | |