Spaces:
Running
Running
# -*- encoding: utf-8 -*- | |
# @Author: SWHL | |
# @Contact: [email protected] | |
from pathlib import Path | |
import streamlit as st | |
if __name__ == '__main__': | |
st.markdown("<h1 style='text-align: center;'><a href='https://github.com/RapidAI/RapidStructure' style='text-decoration: none'>Rapid Structure</a></h1>", unsafe_allow_html=True) | |
st.markdown(""" | |
<p align="left"> | |
<a href=""><img src="https://img.shields.io/badge/Python->=3.7,<=3.10-aff.svg"></a> | |
<a href=""><img src="https://img.shields.io/badge/OS-Linux%2C%20Win%2C%20Mac-pink.svg"></a> | |
<a href="https://pepy.tech/project/rapid-layout"><img src="https://static.pepy.tech/personalized-badge/rapid-layout?period=total&units=abbreviation&left_color=grey&right_color=blue&left_text=rapid-layout"></a> | |
<a href="https://pepy.tech/project/rapid-orientation"><img src="https://static.pepy.tech/personalized-badge/rapid-orientation?period=total&units=abbreviation&left_color=grey&right_color=blue&left_text=rapid-orientation"></a> | |
<a href="https://pepy.tech/project/rapid-table"><img src="https://static.pepy.tech/personalized-badge/rapid-table?period=total&units=abbreviation&left_color=grey&right_color=blue&left_text=rapid-table"></a> | |
</p> | |
""", unsafe_allow_html=True) | |
st.markdown('戳这里查看支持模型列表:[PaddleOCR Models](https://github.com/PaddlePaddle/PaddleOCR/blob/release/2.6/doc/doc_ch/models_list.md)') | |
default_url = 'e.g. https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_infer.tar' | |
url = st.text_input('输入模型地址:', help=default_url) | |
default_txt_path = 'e.g. https://raw.githubusercontent.com/PaddlePaddle/PaddleOCR/release/2.6/ppocr/utils/ppocr_keys_v1.txt' | |
txt_url = st.text_input('输入txt地址(文本识别模型时,必选):', help=default_txt_path) | |
save_dir = 'models' | |
save_onnx_path = '' | |
is_convert = st.button('Convert') | |