bluenevus commited on
Commit
62246c7
·
verified ·
1 Parent(s): 0d24647

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -35,6 +35,9 @@ def load_model():
35
  snac_model = SNAC.from_pretrained("hubertsiuzdak/snac_24khz")
36
  snac_model = snac_model.to(device)
37
 
 
 
 
38
  logger.info("Loading Orpheus model...")
39
  model_name = "canopylabs/orpheus-3b-0.1-ft"
40
 
@@ -254,6 +257,6 @@ with gr.Blocks() as demo:
254
  if __name__ == "__main__":
255
  try:
256
  load_model()
257
- demo.launch()
258
  except Exception as e:
259
  logger.error(f"Error launching the application: {str(e)}")
 
35
  snac_model = SNAC.from_pretrained("hubertsiuzdak/snac_24khz")
36
  snac_model = snac_model.to(device)
37
 
38
+ if snac_model is None:
39
+ raise ValueError("Failed to load SNAC model")
40
+
41
  logger.info("Loading Orpheus model...")
42
  model_name = "canopylabs/orpheus-3b-0.1-ft"
43
 
 
257
  if __name__ == "__main__":
258
  try:
259
  load_model()
260
+ demo.queue().launch(share=False, ssr_mode=False)
261
  except Exception as e:
262
  logger.error(f"Error launching the application: {str(e)}")