Spaces:
Runtime error
Runtime error
Update src/streamlit_app.py
Browse files- src/streamlit_app.py +15 -0
src/streamlit_app.py
CHANGED
|
@@ -288,6 +288,21 @@ def generate_network_graph(df, raw_text, entity_color_map):
|
|
| 288 |
yaxis=dict(showgrid=False, zeroline=False, showticklabels=False, range=[-15, 15]),
|
| 289 |
plot_bgcolor='#f9f9f9', paper_bgcolor='#f9f9f9',
|
| 290 |
margin=dict(t=50, b=10, l=10, r=10), height=600
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 291 |
)
|
| 292 |
return fig
|
| 293 |
|
|
|
|
| 288 |
yaxis=dict(showgrid=False, zeroline=False, showticklabels=False, range=[-15, 15]),
|
| 289 |
plot_bgcolor='#f9f9f9', paper_bgcolor='#f9f9f9',
|
| 290 |
margin=dict(t=50, b=10, l=10, r=10), height=600
|
| 291 |
+
|
| 292 |
+
annotations=[
|
| 293 |
+
dict(
|
| 294 |
+
text="When a line is drawn between two nodes (entities), it means those two entities co-occurred in the same sentence at least once.",
|
| 295 |
+
xref="paper", yref="paper",
|
| 296 |
+
x=0.5, y=0.95, # Position below the title
|
| 297 |
+
showarrow=False,
|
| 298 |
+
font=dict(size=12, color="gray")
|
| 299 |
+
)
|
| 300 |
+
]
|
| 301 |
+
|
| 302 |
+
|
| 303 |
+
|
| 304 |
+
|
| 305 |
+
|
| 306 |
)
|
| 307 |
return fig
|
| 308 |
|