SWHL's picture
Update app.py
134c129
raw
history blame
1.9 kB
# -*- encoding: utf-8 -*-
# @Author: SWHL
# @Contact: liekkaskono@163.com
import numpy as np
import streamlit as st
from PIL import Image
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)
img_suffix = ["png", "jpg", "jpeg"]
st.markdown('##### rapid-orientation (文档图像分类) demo')
img_empty = st.empty()
img_file_buffer = st.file_uploader("Upload an image",
type=img_suffix,
label_visibility='hidden')
if img_file_buffer:
image = Image.open(img_file_buffer)
img_array = np.array(image)
if image:
img_empty.image(image, use_column_width=True)
st.markdown('##### rapid-layout (版面分析) demo')
st.markdown('##### rapid-table (表格还原) demo')