Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -64,9 +64,11 @@ def extract_context_words(text, high_information_words):
|
|
64 |
def create_context_graph(context_words):
|
65 |
graph = Digraph()
|
66 |
for index, (before_word, high_info_word, after_word) in enumerate(context_words):
|
67 |
-
graph.node(f'before{index}', before_word, shape='box') if before_word else None
|
|
|
68 |
graph.node(f'high{index}', high_info_word, shape='ellipse')
|
69 |
-
graph.node(f'after{index}', after_word, shape='diamond') if after_word else None
|
|
|
70 |
if before_word:
|
71 |
graph.edge(f'before{index}', f'high{index}')
|
72 |
if after_word:
|
|
|
64 |
def create_context_graph(context_words):
|
65 |
graph = Digraph()
|
66 |
for index, (before_word, high_info_word, after_word) in enumerate(context_words):
|
67 |
+
#graph.node(f'before{index}', before_word, shape='box') if before_word else None
|
68 |
+
if before_word: graph.node(f'before{index}', before_word, shape='box') # else None
|
69 |
graph.node(f'high{index}', high_info_word, shape='ellipse')
|
70 |
+
#graph.node(f'after{index}', after_word, shape='diamond') if after_word else None
|
71 |
+
if after_word: graph.node(f'after{index}', after_word, shape='diamond') # else None
|
72 |
if before_word:
|
73 |
graph.edge(f'before{index}', f'high{index}')
|
74 |
if after_word:
|