abdullahmubeen10 commited on
Commit
b79e853
Β·
verified Β·
1 Parent(s): 43104d1

Update Demo.py

Browse files
Files changed (1) hide show
  1. Demo.py +4 -3
Demo.py CHANGED
@@ -548,8 +548,9 @@ language_map = {
548
  'zza': "Zaza"
549
  }
550
 
551
- language = language_map[output['language'][0].result]
552
- confidence = round(float(output['language'][0].metadata[language])*100, 2)
 
553
 
554
- st.markdown(f"This text is in **{language} ({output['language'][0].result})** language.")
555
  st.markdown(f"Classification Confidence: **{confidence}%**")
 
548
  'zza': "Zaza"
549
  }
550
 
551
+ abbreviation = output['language'][0].result
552
+ language = language_map[abbreviation]
553
+ confidence = round(float(output['language'][0].metadata[abbreviation])*100, 2)
554
 
555
+ st.markdown(f"This text is in **{language} ({abbreviation})** language.")
556
  st.markdown(f"Classification Confidence: **{confidence}%**")