ElPierrito commited on
Commit
218ec6c
·
verified ·
1 Parent(s): 3cc8829

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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]