Unverified Commit e6f81486 authored by Chia-Yu Hung's avatar Chia-Yu Hung Committed by GitHub
Browse files

Update README.md

parent 8d1cdcee
...@@ -31,11 +31,14 @@ TangoFlux consists of FluxTransformer blocks which are Diffusion Transformer (Di ...@@ -31,11 +31,14 @@ TangoFlux consists of FluxTransformer blocks which are Diffusion Transformer (Di
## Inference with TangoFlux ## Inference with TangoFlux
Download the TangoFlux model and generate audio from a text prompt: Download the TangoFlux model and generate audio from a text prompt:
```import torchaudio ```python
import torchaudio
from tangoflux import TangoFluxInference from tangoflux import TangoFluxInference
from IPython.display import Audio from IPython.display import Audio
model = TangoFluxInference(name='declare-lab/TangoFlux') model = TangoFluxInference(name='declare-lab/TangoFlux')
audio = model.generate('Hammer slowly hitting the wooden table', steps=50, duration=10) audio = model.generate('Hammer slowly hitting the wooden table', steps=50, duration=10)
Audio(data=audio, rate=44100) Audio(data=audio, rate=44100)
``` ```
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment