resolverkatla commited on
Commit
7b0aeff
·
1 Parent(s): ea52805
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -6,7 +6,7 @@ classifier = pipeline("text-classification", model="mrm8488/bert-tiny-finetuned-
6
 
7
  def spam_detector(text):
8
  result = classifier(text)
9
- return "Spam" if result[1]['label'] == 'spam' else "Not Spam"
10
 
11
  # Create Gradio UI
12
  app = gr.Interface(
 
6
 
7
  def spam_detector(text):
8
  result = classifier(text)
9
+ return "Spam" if result[0]['label'] == 'spam' else "Not Spam"
10
 
11
  # Create Gradio UI
12
  app = gr.Interface(