zaidmehdi commited on
Commit
64233e1
·
1 Parent(s): 172e713

output predictions

Browse files
Files changed (1) hide show
  1. src/main.py +3 -2
src/main.py CHANGED
@@ -42,7 +42,9 @@ def classify_arabic_dialect(text):
42
  top_three_labels = model.classes_[top_three_indices]
43
  top_three_probabilities = probabilities[top_three_indices]
44
 
45
- return top_three_labels, top_three_probabilities
 
 
46
 
47
 
48
  with gr.Blocks() as demo:
@@ -62,4 +64,3 @@ with gr.Blocks() as demo:
62
 
63
  if __name__ == "__main__":
64
  demo.launch()
65
-
 
42
  top_three_labels = model.classes_[top_three_indices]
43
  top_three_probabilities = probabilities[top_three_indices]
44
 
45
+ return (top_three_labels[0], top_three_probabilities[0]),\
46
+ (top_three_labels[1], top_three_probabilities[1]),\
47
+ (top_three_labels[2], top_three_probabilities[2])
48
 
49
 
50
  with gr.Blocks() as demo:
 
64
 
65
  if __name__ == "__main__":
66
  demo.launch()