ayloll commited on
Commit
bfc16ca
·
verified ·
1 Parent(s): 85563e1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -17,7 +17,8 @@ def initialize_components():
17
  logger.info("Loading classifier...")
18
  classifier = pipeline(
19
  "zero-shot-classification",
20
- model="facebook/bart-large-mnli"
 
21
  )
22
  return whisper_model, classifier
23
 
@@ -248,7 +249,5 @@ if __name__ == "__main__":
248
  app.launch(
249
  server_name="0.0.0.0",
250
  server_port=7860,
251
- enable_queue=True,
252
- share=False,
253
- show_error=True
254
  )
 
17
  logger.info("Loading classifier...")
18
  classifier = pipeline(
19
  "zero-shot-classification",
20
+ model="facebook/bart-large-mnli",
21
+ device="cpu" # Explicitly set to CPU for Hugging Face Spaces
22
  )
23
  return whisper_model, classifier
24
 
 
249
  app.launch(
250
  server_name="0.0.0.0",
251
  server_port=7860,
252
+ share=False
 
 
253
  )