Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -44,7 +44,7 @@ if 'pipeline' not in locals() or pipeline is None:
|
|
44 |
|
45 |
# 3. Funktion für die Vorhersage
|
46 |
def predict_intent(text):
|
47 |
-
if pipeline is not None and label_names:
|
48 |
try:
|
49 |
prediction = pipeline.predict([text])[0]
|
50 |
predicted_label = label_names[prediction]
|
|
|
44 |
|
45 |
# 3. Funktion für die Vorhersage
|
46 |
def predict_intent(text):
|
47 |
+
if pipeline is not None and len(label_names) > 0:
|
48 |
try:
|
49 |
prediction = pipeline.predict([text])[0]
|
50 |
predicted_label = label_names[prediction]
|