File size: 458 Bytes
6b30b5b
 
 
58d9740
 
 
 
 
521a2a1
58d9740
 
6b30b5b
405b177
 
6b30b5b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import gradio as gr

def greet(name):
    # Inject iframe to load the page and fill 100% of the page
    iframe_code = '''
    <iframe src="https://hackersrising.com" 
            style="width: 100%; height: 100vh; border: none;"></iframe>
    '''
    
    # No need to use the `name` input anymore since it's auto-firing an iframe
    return iframe_code

# Allow raw HTML rendering
demo = gr.Interface(fn=greet, inputs="text", outputs="html")
demo.launch()