Loguie's picture
a
6f48cfb verified
raw
history blame
997 Bytes
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 google/pegasus-xsum 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/google/pegasus-xsum", accept_token=button, provider="hf-inference")
def show_html():
html_content = """
<html>
<body style="background-color:white; color:black;">
<h1>Welcome to the HTML page</h1>
<input type="text" placeholder="Enter your name">
<input type="text" placeholder="Enter your email">
</body>
</html>
"""
return html_content
# Create a Gradio interface with custom CSS to set the font color to black
css = """
body {
color: black;
}
"""
iface = gr.Interface(fn=show_html, inputs=[], outputs="html", css=css)
iface.launch()
demo.launch()