Spaces:
Build error
Build error
Download docling.py from cryogenic22/Synaptyx_docs: direct link, hf CLI and curl.
- Browser
- Download file 834 Bytes
-
https://huggingface.co/spaces/cryogenic22/Synaptyx_docs/resolve/main/docling.py
- Command line
-
hf download hf://spaces/cryogenic22/Synaptyx_docs/docling.py
-
curl -L -o docling.py https://huggingface.co/spaces/cryogenic22/Synaptyx_docs/resolve/main/docling.py
834 Bytes
| import streamlit as st | |
| import os | |
| st.title("Install Docling") | |
| # Bash script to install Docling | |
| bash_script = """ | |
| #!/bin/bash | |
| # Clone the Docling repository | |
| git clone https://github.com/IBM/docling.git | |
| # Navigate to the Docling directory | |
| cd docling | |
| # Install Docling | |
| pip install . | |
| # Remove the cloned repository (optional) | |
| # rm -rf ../docling | |
| echo "Docling installed successfully!" | |
| """ | |
| # Create a temporary bash script file | |
| with open("install_docling.sh", "w") as f: | |
| f.write(bash_script) | |
| # Make the script executable | |
| os.chmod("install_docling.sh", 0o755) | |
| # Run the bash script | |
| if st.button("Install Docling"): | |
| with st.spinner("Installing Docling..."): | |
| result = os.popen("./install_docling.sh").read() | |
| st.code(result, language="bash") | |
| # Clean up the script file | |
| os.remove("install_docling.sh") |