File size: 997 Bytes
c2d3c9c
 
 
 
 
 
 
 
bd7ace2
 
 
 
6f48cfb
bd7ace2
 
 
 
 
 
 
 
6f48cfb
 
 
 
 
 
 
 
bd7ace2
 
c2d3c9c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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()