Update app.py
Browse files
app.py
CHANGED
@@ -91,16 +91,6 @@ def inicializar_grafo():
|
|
91 |
print("Graph Initialized with Nodes:", G.nodes()) # 馃攳 Debugging: Print nodes
|
92 |
print("Graph Initialized with Edges:", G.edges()) # 馃攳 Debugging: Print edges
|
93 |
|
94 |
-
def inicializar_grafo():
|
95 |
-
df = cargar_desde_airtable()
|
96 |
-
for _, row in df.iterrows():
|
97 |
-
nombre, conceptos = row["Nombre"], row["Conceptos"]
|
98 |
-
for termino in conceptos.split():
|
99 |
-
if not G.has_node(termino):
|
100 |
-
G.add_node(termino, color='gray')
|
101 |
-
if not G.has_edge(nombre, termino):
|
102 |
-
G.add_edge(nombre, termino)
|
103 |
-
|
104 |
def guardar_en_airtable(nombre, conceptos):
|
105 |
if isinstance(conceptos, str):
|
106 |
conceptos = [c.strip() for c in conceptos.split(',') if c.strip()] # Ensure it's a list
|
|
|
91 |
print("Graph Initialized with Nodes:", G.nodes()) # 馃攳 Debugging: Print nodes
|
92 |
print("Graph Initialized with Edges:", G.edges()) # 馃攳 Debugging: Print edges
|
93 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
94 |
def guardar_en_airtable(nombre, conceptos):
|
95 |
if isinstance(conceptos, str):
|
96 |
conceptos = [c.strip() for c in conceptos.split(',') if c.strip()] # Ensure it's a list
|