Spaces:
Sleeping
Sleeping
Update index.py
Browse files
index.py
CHANGED
@@ -30,6 +30,9 @@ print(unique_domains)
|
|
30 |
unique_topics = df['Topic'].unique()
|
31 |
print(unique_topics)
|
32 |
|
|
|
|
|
|
|
33 |
# df = df.rename(columns={df.columns[4]: "Veículos de notícias"})
|
34 |
|
35 |
df['FinBERT_label'] = df['FinBERT_label'].astype(str)
|
@@ -149,7 +152,7 @@ def update_output(selected_topic, selected_domain, start_date, end_date):
|
|
149 |
|
150 |
#create line graphs based on filtered dataframes
|
151 |
line_fig_1 = px.line(df_filtered, x="date", y="normalised results",
|
152 |
-
color='
|
153 |
|
154 |
# Veículos de notícias
|
155 |
#set x-axis title and y-axis title in line graphs
|
|
|
30 |
unique_topics = df['Topic'].unique()
|
31 |
print(unique_topics)
|
32 |
|
33 |
+
#copying a column
|
34 |
+
df["Veículos de notícias"] = df["domain_folder_name"]
|
35 |
+
|
36 |
# df = df.rename(columns={df.columns[4]: "Veículos de notícias"})
|
37 |
|
38 |
df['FinBERT_label'] = df['FinBERT_label'].astype(str)
|
|
|
152 |
|
153 |
#create line graphs based on filtered dataframes
|
154 |
line_fig_1 = px.line(df_filtered, x="date", y="normalised results",
|
155 |
+
color='Veículos de notícias', title="O gráfico mostra a evolução temporal de sentimento dos títulos de notícias. Numa escala de -1 (negativo) a 1 (positivo), sendo 0 (neutro).")
|
156 |
|
157 |
# Veículos de notícias
|
158 |
#set x-axis title and y-axis title in line graphs
|