Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
|
| 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 |
)
|