Spaces:
Runtime error
Runtime error
# Step 1: Improved layout and clean sidebar | |
import gradio as gr | |
MODEL_ID = "Salesforce/codet5-large" | |
with gr.Blocks(fill_height=True, theme=gr.themes.Soft()) as demo: | |
with gr.Sidebar(): | |
gr.Markdown("## 🤖 Inference Provider") | |
gr.Markdown( | |
f"This Space showcases the `{MODEL_ID}` model, served via the Hugging Face Inference API.\n\n" | |
"🔐 Sign in with your Hugging Face account to use this API." | |
) | |
login_button = gr.LoginButton("🔐 Sign in") | |
gr.Markdown("---") | |
gr.Markdown(f"**Model:** `{MODEL_ID}`") | |
gr.Markdown("[📄 View Model Card](https://huggingface.co/Salesforce/codet5-large)") | |
gr.Markdown("# 🧠 CodeT5 Inference UI") | |
# Placeholder: we'll add inputs, buttons, outputs in next steps | |
gr.Markdown("_Interface under construction..._") | |
# Load HF inference API model | |
gr.load( | |
f"models/{MODEL_ID}", | |
accept_token=login_button, | |
provider="hf-inference" | |
) | |
demo.launch() | |