1 Star 0 Fork 1

Jerry/surya

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
run_ocr_app.py 616 Bytes
一键复制 编辑 原始数据 按行查看 历史
import argparse
import subprocess
import os
def run_app():
parser = argparse.ArgumentParser(description="Run the streamlit OCR app")
parser.add_argument("--math", action="store_true", help="Use math model for detection", default=False)
args = parser.parse_args()
cur_dir = os.path.dirname(os.path.abspath(__file__))
ocr_app_path = os.path.join(cur_dir, "ocr_app.py")
cmd = ["streamlit", "run", ocr_app_path]
if args.math:
cmd.append("--")
cmd.append("--math")
subprocess.run(cmd, env={**os.environ, "IN_STREAMLIT": "true"})
if __name__ == "__main__":
run_app()
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/JerryFox/surya.git
git@gitee.com:JerryFox/surya.git
JerryFox
surya
surya
master

搜索帮助

23e8dbc6 1850385 7e0993f3 1850385