Update app.py
Browse files
app.py
CHANGED
@@ -40,10 +40,15 @@ def evaluate(text) :
|
|
40 |
result = np.round(result.numpy(), 2).tolist()
|
41 |
return {'Liberal': result[0][0], 'Conservative': result[0][1]}
|
42 |
|
|
|
|
|
|
|
|
|
43 |
iface = gr.Interface(fn=evaluate,
|
44 |
inputs='text',
|
45 |
outputs=gr.components.Label(num_top_classes=2),
|
46 |
examples=[["Biden speech draws 38.2 million U.S. TV viewers"],
|
47 |
["Biden's first State of the Union address in 67 seconds"]],
|
48 |
-
title='Political Sentiment Classification Using BERT Transformer'
|
|
|
49 |
iface.launch()
|
|
|
40 |
result = np.round(result.numpy(), 2).tolist()
|
41 |
return {'Liberal': result[0][0], 'Conservative': result[0][1]}
|
42 |
|
43 |
+
|
44 |
+
|
45 |
+
article = "<p style='text align: center'><a href='https://github.com/acmucsd-projects/fa22-ai-team-2' target='_blank'>GitHub Repo</a></p><center><img src='https://visitor-badge.glitch.me/badge?page_id=joonkim/bert-political-sentiment-analysis' alt='visitor badge'></center>"
|
46 |
+
|
47 |
iface = gr.Interface(fn=evaluate,
|
48 |
inputs='text',
|
49 |
outputs=gr.components.Label(num_top_classes=2),
|
50 |
examples=[["Biden speech draws 38.2 million U.S. TV viewers"],
|
51 |
["Biden's first State of the Union address in 67 seconds"]],
|
52 |
+
title='Political Sentiment Classification Using BERT Transformer',
|
53 |
+
article=article)
|
54 |
iface.launch()
|