| import gradio as gr | |
| with gr.Blocks(fill_height=True) as demo: | |
| with gr.Sidebar(): | |
| gr.Markdown("# Inference Provider") | |
| gr.Markdown("This Space showcases the microsoft/trocr-large-handwritten model, served by the hf-inference API. Sign in with your Hugging Face account to use this API.") | |
| button = gr.LoginButton("Sign in") | |
| gr.load("models/microsoft/trocr-large-handwritten", accept_token=button, provider="hf-inference") | |
| demo.launch() | 
