Spaces:
Runtime error
Runtime error
Download src/main.py from Ansemin101/Markit_v2: direct link, hf CLI and curl.
- Browser
- Download file 628 Bytes
-
https://huggingface.co/spaces/Ansemin101/Markit_v2/resolve/main/src/main.py
- Command line
-
hf download hf://spaces/Ansemin101/Markit_v2/src/main.py
-
curl -L -o main.py https://huggingface.co/spaces/Ansemin101/Markit_v2/resolve/main/src/main.py
628 Bytes
| import os | |
| from src import parsers # Import all parsers to ensure they're registered | |
| from src.ui.ui import launch_ui | |
| def main(): | |
| # Detect if running in Hugging Face Spaces | |
| is_hf_space = os.getenv("SPACE_ID") is not None | |
| if is_hf_space: | |
| # Hugging Face Spaces configuration | |
| launch_ui( | |
| server_name="0.0.0.0", | |
| server_port=7860, | |
| share=False | |
| ) | |
| else: | |
| # Local development configuration | |
| launch_ui( | |
| server_name="localhost", | |
| server_port=7860, | |
| share=False | |
| ) | |
| if __name__ == "__main__": | |
| main() | |