benjolo commited on
Commit
e481add
1 Parent(s): da30ce9

Update backend/main.py

Browse files
Files changed (1) hide show
  1. backend/main.py +3 -10
backend/main.py CHANGED
@@ -40,15 +40,6 @@ import socketio
40
  ###############################################
41
  # Configure logger
42
 
43
- # logging.basicConfig(filename="backend.log",
44
- # filemode='w',
45
- # format='%(asctime)s,%(msecs)d %(name)s %(levelname)s %(message)s',
46
- # datefmt='%H:%M:%S',
47
- # level=logging.DEBUG)
48
-
49
- # logger = logging.getLogger("socketio_server_pubsub")
50
- # gunicorn_logger.propagate = True
51
-
52
  gunicorn_error_logger = logging.getLogger("gunicorn.error")
53
  gunicorn_logger = logging.getLogger("gunicorn")
54
  uvicorn_access_logger = logging.getLogger("uvicorn.access")
@@ -143,8 +134,10 @@ static_files = {
143
  }
144
  device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
145
  processor = AutoProcessor.from_pretrained("facebook/seamless-m4t-v2-large", cache_dir="/.cache")
 
146
  # PM - hardcoding temporarily as my GPU doesnt have enough vram
147
- model = SeamlessM4Tv2Model.from_pretrained("facebook/seamless-m4t-v2-large").to("cpu")
 
148
 
149
 
150
  bytes_data = bytearray()
 
40
  ###############################################
41
  # Configure logger
42
 
 
 
 
 
 
 
 
 
 
43
  gunicorn_error_logger = logging.getLogger("gunicorn.error")
44
  gunicorn_logger = logging.getLogger("gunicorn")
45
  uvicorn_access_logger = logging.getLogger("uvicorn.access")
 
134
  }
135
  device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
136
  processor = AutoProcessor.from_pretrained("facebook/seamless-m4t-v2-large", cache_dir="/.cache")
137
+
138
  # PM - hardcoding temporarily as my GPU doesnt have enough vram
139
+ # model = SeamlessM4Tv2Model.from_pretrained("facebook/seamless-m4t-v2-large").to("cpu")
140
+ model = SeamlessM4Tv2Model.from_pretrained("facebook/seamless-m4t-v2-large").to(device)
141
 
142
 
143
  bytes_data = bytearray()