Spaces:
Sleeping
Sleeping
File size: 599 Bytes
549c8c9 40ddbd2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Hugging Face Spaces部署入口文件
"""
import os
import sys
sys.path.append(os.path.join(os.path.dirname(__file__), 'photograph'))
# 导入gradio应用
from photograph.gradio_app import create_interface
# 创建应用实例
app = create_interface()
# 启动应用(HF Spaces会自动处理)
if __name__ == "__main__":
app.launch(
server_name="0.0.0.0",
server_port=7860,
share=False, # HF Spaces不需要share
inbrowser=False, # HF Spaces不需要自动打开浏览器
show_error=True
) |