table fix
Browse files
app.py
CHANGED
@@ -49,13 +49,18 @@ else:
|
|
49 |
|
50 |
if st.button('Analyze'):
|
51 |
result = classifier(input)
|
52 |
-
output =
|
53 |
result = result[0]
|
54 |
if option == 'Fine-Tuned':
|
55 |
-
|
|
|
|
|
|
|
|
|
|
|
56 |
else:
|
57 |
output = result
|
58 |
-
|
59 |
else:
|
60 |
st.write('Excited to analyze!')
|
61 |
|
|
|
49 |
|
50 |
if st.button('Analyze'):
|
51 |
result = classifier(input)
|
52 |
+
output = []
|
53 |
result = result[0]
|
54 |
if option == 'Fine-Tuned':
|
55 |
+
result = unpack(result)
|
56 |
+
output.append(['Tweet', 'Highest', 'Score', 'Second Highest', 'Score'])
|
57 |
+
highest = (max(result, key=result.get), result[max(result, key=result.get)])
|
58 |
+
result.pop(max(result, key=result.get))
|
59 |
+
output.append([input, max(result, highest[0], highest[1], key=result.get), result[max(result, key=result.get)]])
|
60 |
+
st.table(output)
|
61 |
else:
|
62 |
output = result
|
63 |
+
st.write(output)
|
64 |
else:
|
65 |
st.write('Excited to analyze!')
|
66 |
|