@@ -107,9 +107,9 @@ def count_total_implementations(implementations_by_type: Dict[str, List[Dict]])
107107 total_count = 0
108108 for _impl_type , implementations in implementations_by_type .items ():
109109 for impl in implementations :
110- # Count the algorithms in each implementation
111- if "algorithms " in impl and impl ["algorithms " ]:
112- total_count += len (impl ["algorithms " ])
110+ # Count the implementations
111+ if "implementations " in impl and impl ["implementations " ]:
112+ total_count += len (impl ["implementations " ])
113113
114114 return total_count
115115
@@ -176,24 +176,24 @@ def generate_card_html(impl: Dict) -> str:
176176 HTML string for the implementation card
177177
178178 """
179- # Extract algorithms to display as tags
180- algorithms = impl .get ("algorithms " , [])
179+ # Extract implementations to display as tags
180+ implementations = impl .get ("implementations " , [])
181181 tag_html = ""
182182
183- # Create algorithm tags with data-tippy attribute
184- for algo in algorithms :
185- if isinstance (algo , dict ) and "name" in algo :
186- algo_name = algo ["name" ].strip ()
187- algo_url = algo .get ("url" , "" )
183+ # Create implementation tags with data-tippy attribute
184+ for impl_ in implementations :
185+ if isinstance (impl_ , dict ) and "name" in impl_ :
186+ impl_name = impl_ ["name" ].strip ()
187+ impl_url = impl_ .get ("url" , "" )
188188
189- if algo_url :
190- tag_html += f' <a href="{ algo_url } " class="tag" target="_blank">{ algo_name } </a> '
189+ if impl_url :
190+ tag_html += f' <a href="{ impl_url } " class="tag" target="_blank">{ impl_name } </a> '
191191 else :
192- tag_html += f' <span class="tag" data-tippy="{ algo_name } ">{ algo_name } </span> '
192+ tag_html += f' <span class="tag" data-tippy="{ impl_name } ">{ impl_name } </span> '
193193 else :
194- algo_text = str (algo ).strip ()
195- if algo_text :
196- tag_html += f' <span class="tag" data-tippy="{ algo_text } ">{ algo_text } </span> '
194+ impl_text = str (impl_ ).strip ()
195+ if impl_text :
196+ tag_html += f' <span class="tag" data-tippy="{ impl_text } ">{ impl_text } </span> '
197197
198198 # Format datasets
199199 formatted_datasets = format_datasets (impl .get ("public_datasets" , []))
0 commit comments