Spaces:
Runtime error
Runtime error
Download convert.py from Kikolool/VibeLearning: direct link, hf CLI and curl.
- Browser
- Download file 268 Bytes
-
https://huggingface.co/spaces/Kikolool/VibeLearning/resolve/main/convert.py
- Command line
-
hf download hf://spaces/Kikolool/VibeLearning/convert.py
-
curl -L -o convert.py https://huggingface.co/spaces/Kikolool/VibeLearning/resolve/main/convert.py
268 Bytes
| import re | |
| from fastapi import File, UploadFile | |
| from markitdown import MarkItDown | |
| def clean_json_string(json_string): | |
| pattern = r"^```json\s*(.*?)\s*```$" | |
| cleaned_string = re.sub(pattern, r"\1", json_string, flags=re.DOTALL) | |
| return cleaned_string.strip() | |