update
Browse files
app.py
CHANGED
|
@@ -6,6 +6,7 @@ import torch
|
|
| 6 |
from GoogleNews import GoogleNews
|
| 7 |
from transformers import pipeline
|
| 8 |
|
|
|
|
| 9 |
# Set up logging
|
| 10 |
logging.basicConfig(
|
| 11 |
level=logging.INFO, format="%(asctime)s - %(levelname)s - %(message)s"
|
|
@@ -88,8 +89,16 @@ def convert_to_dataframe(analyzed_articles):
|
|
| 88 |
|
| 89 |
with gr.Blocks() as iface:
|
| 90 |
gr.Markdown("# Trading Asset Sentiment Analysis")
|
|
|
|
|
|
|
|
|
|
|
|
|
| 91 |
gr.Markdown(
|
| 92 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
| 93 |
)
|
| 94 |
|
| 95 |
with gr.Row():
|
|
@@ -108,6 +117,16 @@ with gr.Blocks() as iface:
|
|
| 108 |
"Tesla",
|
| 109 |
"Apple",
|
| 110 |
"Amazon",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 111 |
],
|
| 112 |
inputs=input_asset,
|
| 113 |
)
|
|
|
|
| 6 |
from GoogleNews import GoogleNews
|
| 7 |
from transformers import pipeline
|
| 8 |
|
| 9 |
+
|
| 10 |
# Set up logging
|
| 11 |
logging.basicConfig(
|
| 12 |
level=logging.INFO, format="%(asctime)s - %(levelname)s - %(message)s"
|
|
|
|
| 89 |
|
| 90 |
with gr.Blocks() as iface:
|
| 91 |
gr.Markdown("# Trading Asset Sentiment Analysis")
|
| 92 |
+
gr.Markdown("Analyze the sentiment of recent articles related to a trading asset.")
|
| 93 |
+
gr.Markdown("---")
|
| 94 |
+
gr.Markdown("### 👨💻 Author: **Nanda Safiq Alfiansyah** - time")
|
| 95 |
+
gr.Markdown("### 🆔 NIM: 21533401 | Kelas: TI 7A")
|
| 96 |
gr.Markdown(
|
| 97 |
+
"""
|
| 98 |
+
🔎 **How it works:**
|
| 99 |
+
Enter the name of a trading asset below, and I'll fetch the latest articles
|
| 100 |
+
and provide a detailed sentiment analysis. Let's dive in!
|
| 101 |
+
"""
|
| 102 |
)
|
| 103 |
|
| 104 |
with gr.Row():
|
|
|
|
| 117 |
"Tesla",
|
| 118 |
"Apple",
|
| 119 |
"Amazon",
|
| 120 |
+
"Microsoft",
|
| 121 |
+
"Meta",
|
| 122 |
+
"Google",
|
| 123 |
+
"Ethereum",
|
| 124 |
+
"Gold",
|
| 125 |
+
"Crude Oil",
|
| 126 |
+
"USD/EUR",
|
| 127 |
+
"Alibaba",
|
| 128 |
+
"Netflix",
|
| 129 |
+
"Samsung",
|
| 130 |
],
|
| 131 |
inputs=input_asset,
|
| 132 |
)
|