Download docgenie/generation/utils/visualelement.py from Text-to-Document-Generation/Docgenie-API: direct link, hf CLI and curl.
- Browser
- Download file 272 Bytes
-
https://huggingface.co/spaces/Text-to-Document-Generation/Docgenie-API/resolve/main/docgenie/generation/utils/visualelement.py
- Command line
-
hf download hf://spaces/Text-to-Document-Generation/Docgenie-API/docgenie/generation/utils/visualelement.py
-
curl -L -o visualelement.py https://huggingface.co/spaces/Text-to-Document-Generation/Docgenie-API/resolve/main/docgenie/generation/utils/visualelement.py
272 Bytes
| __PREFIX = "&?ve" | |
| def get_visual_element_id(i: int) -> str: | |
| return f"{__PREFIX}{i}" | |
| def is_visual_element_id(s: str) -> bool: | |
| if s.startswith(__PREFIX): | |
| s = s.replace(__PREFIX, "") | |
| return s.isdigit() | |
| else: | |
| return False | |