Jan24's picture
Update app.py
549c8c9 verified
raw
history blame contribute delete
599 Bytes
#!/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
)