AIguysingstoo's picture
Update main.py
e901991 verified
raw
history blame contribute delete
741 Bytes
#!/usr/bin/env python3
"""Main entry point for the Model Benchmark Agent."""
import os
# Disable tokenizer parallelism to avoid forking issues
os.environ["TOKENIZERS_PARALLELISM"] = "false"
#!/usr/bin/env python3
import sys
import os
from interfaces.gradio_app import launch_app
def main():
# Check if running on HuggingFace Spaces
is_huggingface = os.getenv("SPACE_ID") is not None
# If on HuggingFace or gradio argument passed, launch Gradio
if is_huggingface or (len(sys.argv) > 1 and sys.argv[1] == "gradio"):
launch_app()
else:
print("Usage: python main.py [gradio]")
print("Available modes:")
print(" gradio - Launch Gradio interface")
if __name__ == "__main__":
main()