Spaces:
Sleeping
Sleeping
| #!/usr/bin/env python3 | |
| """ | |
| Test the Gradio app locally before deploying to Hugging Face Spaces | |
| """ | |
| import sys | |
| import os | |
| # Add current directory to path | |
| sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) | |
| # Import and run the app | |
| from app import create_gradio_interface | |
| if __name__ == "__main__": | |
| print("🚀 Starting Qwen OCR Detection app locally...") | |
| print("📝 Note: You'll need a Dashscope API key to use this app") | |
| print(" Get one at: https://bailian.console.alibabacloud.com/") | |
| print("") | |
| demo = create_gradio_interface() | |
| demo.launch( | |
| share=False, | |
| server_name="127.0.0.1", | |
| server_port=7861, | |
| inbrowser=True | |
| ) | |