Download ragntex.py from RAGnTeX/ragntex: direct link, hf CLI and curl.
- Browser
- Download file 487 Bytes
-
https://huggingface.co/spaces/RAGnTeX/ragntex/resolve/main/ragntex.py
- Command line
-
hf download hf://spaces/RAGnTeX/ragntex/ragntex.py
-
curl -L -o ragntex.py https://huggingface.co/spaces/RAGnTeX/ragntex/resolve/main/ragntex.py
487 Bytes
| """RAGnTex: A Retrieval-Augmented Generation for LaTeX Documents""" | |
| import os | |
| from src import demo, init_telemetry, database | |
| # Setup OpenTelemetry | |
| _ = init_telemetry() | |
| # Run Gradio | |
| if os.getenv("IN_DOCKER") == "true": | |
| os.chdir("/") | |
| database.init_chroma_client() | |
| demo.launch( | |
| server_name="0.0.0.0", # nosec: intentional bind all interfaces for HuggingFace Spaces | |
| server_port=7860, | |
| ) | |
| else: | |
| database.init_chroma_client() | |
| demo.launch(share=True) | |