gilramos commited on
Commit
2ee78a8
1 Parent(s): dcee1e9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -23,8 +23,7 @@ def predict(chosen_model):
23
 
24
  # Initialize the pipeline with the chosen model
25
  model_pipeline = pipeline("text-classification", model=chosen_model)
26
- for prediction in model_pipeline:
27
- label = model_pipeline['label']
28
  return label
29
 
30
  inputs = [
 
23
 
24
  # Initialize the pipeline with the chosen model
25
  model_pipeline = pipeline("text-classification", model=chosen_model)
26
+ label = model_pipeline[0]['label']
 
27
  return label
28
 
29
  inputs = [