Update app.py
Browse files
app.py
CHANGED
@@ -82,7 +82,7 @@ with col2:
|
|
82 |
st.markdown("Output :bar_chart:")
|
83 |
if 'result' in locals() and result:
|
84 |
if len(result) == 1:
|
85 |
-
for
|
86 |
for prediction in predictions:
|
87 |
predicted_word = prediction['token_str']
|
88 |
score = prediction['score'] * 100
|
@@ -98,9 +98,7 @@ with col2:
|
|
98 |
""", unsafe_allow_html=True)
|
99 |
|
100 |
else:
|
101 |
-
|
102 |
-
for sentence, predictions in result.items():
|
103 |
-
index += 1
|
104 |
if predictions:
|
105 |
top_prediction = predictions[0]
|
106 |
predicted_word = top_prediction['token_str']
|
|
|
82 |
st.markdown("Output :bar_chart:")
|
83 |
if 'result' in locals() and result:
|
84 |
if len(result) == 1:
|
85 |
+
for language, predictions in result.items():
|
86 |
for prediction in predictions:
|
87 |
predicted_word = prediction['token_str']
|
88 |
score = prediction['score'] * 100
|
|
|
98 |
""", unsafe_allow_html=True)
|
99 |
|
100 |
else:
|
101 |
+
for language, predictions in result.items():
|
|
|
|
|
102 |
if predictions:
|
103 |
top_prediction = predictions[0]
|
104 |
predicted_word = top_prediction['token_str']
|