Imadsarvm commited on
Commit
35120ff
1 Parent(s): ff5692c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -1,5 +1,5 @@
1
  import streamlit as st
2
- from transformers import AutoProcessor, SeamlessM4Tv2Model
3
  import torchaudio
4
  import soundfile as sf
5
  import torch
@@ -27,8 +27,8 @@ device = "cuda" if torch.cuda.is_available() else "cpu"
27
  # Function to load and cache the model and processor
28
  @st.cache_resource
29
  def load_model_and_processor():
30
- processor = AutoProcessor.from_pretrained("facebook/seamless-m4t-v2-large")
31
- model = SeamlessM4Tv2Model.from_pretrained("facebook/seamless-m4t-v2-large")
32
  model.to(device)
33
  return processor, model
34
 
 
1
  import streamlit as st
2
+ from transformers import AutoProcessor, SeamlessM4TModel
3
  import torchaudio
4
  import soundfile as sf
5
  import torch
 
27
  # Function to load and cache the model and processor
28
  @st.cache_resource
29
  def load_model_and_processor():
30
+ processor = AutoProcessor.from_pretrained("facebook/hf-seamless-m4t-medium")
31
+ model = SeamlessM4TModel.from_pretrained("facebook/hf-seamless-m4t-medium")
32
  model.to(device)
33
  return processor, model
34