shrikh / README.md
likhonsheikhdev's picture
Create README.md
ef77b4d verified

A newer version of the Gradio SDK is available: 6.1.0

Upgrade
metadata
title: SafeTensors Model Converter
emoji: πŸ”’
colorFrom: blue
colorTo: purple
sdk: gradio
sdk_version: 4.44.0
app_file: app.py
pinned: false
license: mit

SafeTensors Model Converter

A no-code web application for converting machine learning models to the secure SafeTensors format.

Features

  • Zero-code conversion: Simple drag-and-drop interface
  • Multi-framework support: PyTorch and TensorFlow models
  • Secure format: Eliminates pickle-based security risks
  • Fast and efficient: Optimized conversion process

Supported Model Formats

PyTorch

  • .pt files (PyTorch model files)
  • .pth files (PyTorch checkpoint files)

TensorFlow

  • .h5 files (Keras HDF5 format)
  • SavedModel directories (upload as .zip)

How to Use

  1. Select your model's framework (PyTorch or TensorFlow)
  2. Upload your model file
  3. Click "Convert to SafeTensors"
  4. Download your converted model

Why SafeTensors?

SafeTensors is a new simple format for storing tensors safely (as opposed to pickle) and that is still fast (zero-copy).

Benefits:

  • Security: No arbitrary code execution during loading
  • Speed: Faster loading with zero-copy deserialization
  • Memory efficiency: Reduced memory usage
  • Cross-platform: Works across different ML frameworks

Local Development

```bash pip install -r requirements.txt python app.py ```

Deployment

This app is designed to run on Hugging Face Spaces. Simply:

  1. Create a new Space on Hugging Face
  2. Upload these files to your Space
  3. Your app will automatically deploy!

License

MIT License - feel free to use and modify as needed.