import gradio as gr | |
from api import app | |
import os | |
import uvicorn | |
import subprocess | |
if __name__ == "__main__": | |
# 执行命令 | |
subprocess.run(["apt", "install", "imagemagick"]) | |
uvicorn.run("app:app", host="0.0.0.0", port=int(os.environ.get('PORT', 7860)), reload=True) |