Update utils_gdmk.py
Browse files- utils_gdmk.py +3 -3
utils_gdmk.py
CHANGED
@@ -141,7 +141,7 @@ def visualizar_grafo():
|
|
141 |
def guardar_en_airtable(nombre, conceptos, texto):
|
142 |
if isinstance(conceptos, list):
|
143 |
conceptos = [c.strip().replace("'", "").replace('"', '') for c in conceptos if c.strip()]
|
144 |
-
data = {"fields": {"Nombre": nombre, "Conceptos": ", ".join(conceptos)}}
|
145 |
response = requests.post(url, headers=headers, json=data)
|
146 |
if response.status_code != 200:
|
147 |
print(f"Error saving to Airtable: {response.status_code} - {response.text}")
|
@@ -151,12 +151,12 @@ def agregar_aporte(nombre, texto):
|
|
151 |
print(f"Extracted Concepts: {conceptos}") # 馃攳 Debugging
|
152 |
|
153 |
if not G.has_node(nombre):
|
154 |
-
G.add_node(nombre, color='
|
155 |
|
156 |
for termino in conceptos:
|
157 |
termino = termino.strip()
|
158 |
if not G.has_node(termino):
|
159 |
-
G.add_node(termino, color='
|
160 |
if not G.has_edge(nombre, termino):
|
161 |
G.add_edge(nombre, termino)
|
162 |
|
|
|
141 |
def guardar_en_airtable(nombre, conceptos, texto):
|
142 |
if isinstance(conceptos, list):
|
143 |
conceptos = [c.strip().replace("'", "").replace('"', '') for c in conceptos if c.strip()]
|
144 |
+
data = {"fields": {"Nombre": nombre, "Conceptos": ", ".join(conceptos), "Texto_Aporte": texto}}
|
145 |
response = requests.post(url, headers=headers, json=data)
|
146 |
if response.status_code != 200:
|
147 |
print(f"Error saving to Airtable: {response.status_code} - {response.text}")
|
|
|
151 |
print(f"Extracted Concepts: {conceptos}") # 馃攳 Debugging
|
152 |
|
153 |
if not G.has_node(nombre):
|
154 |
+
G.add_node(nombre, color='lightblue')
|
155 |
|
156 |
for termino in conceptos:
|
157 |
termino = termino.strip()
|
158 |
if not G.has_node(termino):
|
159 |
+
G.add_node(termino, color='lightgreen')
|
160 |
if not G.has_edge(nombre, termino):
|
161 |
G.add_edge(nombre, termino)
|
162 |
|