Spaces:
Runtime error
Runtime error
Download patch.py from build-small-hackathon/letxinet-lat: direct link, hf CLI and curl.
- Browser
- Download file 870 Bytes
-
https://huggingface.co/spaces/build-small-hackathon/letxinet-lat/resolve/main/patch.py
- Command line
-
hf download hf://spaces/build-small-hackathon/letxinet-lat/patch.py
-
curl -L -o patch.py https://huggingface.co/spaces/build-small-hackathon/letxinet-lat/resolve/main/patch.py
870 Bytes
| import re | |
| with open("modules/research_tab.py", "r", encoding="utf-8") as f: | |
| lines = f.readlines() | |
| new_lines = [] | |
| for line in lines: | |
| if 'stats_html\n' in line and '""' in line: | |
| line = line.replace('stats_html\n', 'stats_html, ""\n') | |
| elif 'stats_html\n' in line and 'ref_md' in line: | |
| line = line.replace('stats_html\n', 'stats_html, ""\n') | |
| elif 'stats_html' in line and ')' in line and 'yield' not in line: | |
| if '_build_section_cards_html({})' in line or 'Detenido' in line: | |
| line = line.replace('stats_html', 'stats_html, ""') | |
| elif 'sections_map' in line or 'accumulated_report' in line or 'empty_df' in line: | |
| line = line.replace('stats_html', 'stats_html, accumulated_report') | |
| new_lines.append(line) | |
| with open("modules/research_tab.py", "w", encoding="utf-8") as f: | |
| f.writelines(new_lines) | |