hassamniaz7 commited on
Commit
1ea80cb
·
verified ·
1 Parent(s): f9612f8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -46,6 +46,7 @@ def classify_text(text):
46
 
47
  # Loop through up to 3 results
48
  for i, result in enumerate(results[:3]):
 
49
  output += f"Label {i+1}: {result['label']}, Score: {result['score']:.4f}\n"
50
 
51
  return output
 
46
 
47
  # Loop through up to 3 results
48
  for i, result in enumerate(results[:3]):
49
+ # Each result should be a dictionary, so access it with ['label'] and ['score']
50
  output += f"Label {i+1}: {result['label']}, Score: {result['score']:.4f}\n"
51
 
52
  return output