Samuel L Meyers commited on
Commit
96b4603
·
1 Parent(s): 2a303fc

Testing spaces-only feature?

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -1,9 +1,10 @@
1
  import gradio as gr
2
  from transformers import AutoProcessor, BarkModel
3
  import scipy
 
4
 
5
  processor = AutoProcessor.from_pretrained("suno/bark-small")
6
- model = BarkModel.from_pretrained("suno/bark-small")
7
  model = model.to_bettertransformer()
8
 
9
  def greet(text):
 
1
  import gradio as gr
2
  from transformers import AutoProcessor, BarkModel
3
  import scipy
4
+ import torch
5
 
6
  processor = AutoProcessor.from_pretrained("suno/bark-small")
7
+ model = BarkModel.from_pretrained("suno/bark-small", torch_dtype=torch.float16, use_flash_attention_2=True)
8
  model = model.to_bettertransformer()
9
 
10
  def greet(text):