wasmdashai commited on
Commit
6af3229
·
verified ·
1 Parent(s): 03ff2c6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -65,11 +65,11 @@ class OnnxModelConverter:
65
  """
66
  model = VitsModel.from_pretrained(model_name, token=token)
67
  onnx_file = f"/tmp/{onnx_filename}.onnx"
68
- vocab_size = model.text_encoder.embed_tokens.weight.size(0)
69
- example_input = torch.randint(0, vocab_size, (1, 100), dtype=torch.long)
70
 
71
  torch.onnx.export(
72
- model,
73
  example_input,
74
  onnx_file,
75
  opset_version=11,
 
65
  """
66
  model = VitsModel.from_pretrained(model_name, token=token)
67
  onnx_file = f"/tmp/{onnx_filename}.onnx"
68
+ example_input = torch.randn(1, 192, 10)
69
+
70
 
71
  torch.onnx.export(
72
+ model.decoder,
73
  example_input,
74
  onnx_file,
75
  opset_version=11,