# -*- encoding: utf-8 -*- # @Author: SWHL # @Contact: liekkaskono@163.com import gradio as gr def welcome(name): return f"Welcome to Gradio, {name}!" title_content = """ # Rapid⚡OCR

PyPI

""" custom_css = """ body {font-family: body {font-family: 'Helvetica Neue', Helvetica;} .gr-button {background-color: #4CAF50; color: white; border: none; padding: 10px 20px; border-radius: 5px;} .gr-button:hover {background-color: #45a049;} .gr-textbox {margin-bottom: 15px;} .example-button {background-color: #1E90FF; color: white; border: none; padding: 8px 15px; border-radius: 5px; margin: 5px;} .example-button:hover {background-color: #FF4500;} .tall-radio .gr-radio-item {padding: 15px 0; min-height: 50px; display: flex; align-items: center;} .tall-radio label {font-size: 16px;} """ with gr.Blocks( title="Rapid⚡OCR Demo", css="custom_css", theme=gr.themes.Soft() ) as demo: gr.Markdown( "

Rapid⚡OCR

" ) gr.HTML( """
PyPI
""" ) inp = gr.Textbox(placeholder="What is your name?") out = gr.Textbox() inp.change(welcome, inp, out) if __name__ == "__main__": demo.launch(debug=True)