File size: 746 Bytes
88c3e8d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import gradio as gr

# Create a simple HTML interface that embeds the Jupyter notebook
html_content = """
<div style="text-align:center; padding:10px;">
    <h2>Mobile-Friendly Jupyter Notebook</h2>
    <p>The notebook interface will appear below:</p>
</div>
<iframe src="/proxy/8888/tree" width="100%" height="800px" frameborder="0" style="overflow:hidden;"></iframe>
"""

# Create Gradio interface
demo = gr.Interface(
    fn=lambda: None,
    inputs=[],
    outputs=[gr.HTML(html_content)],
    title="Jupyter Notebook",
    css=".gradio-container {max-width: 100% !important; padding: 0 !important;} .min-h-\[48rem\] {min-height: auto !important;}"
)

# Launch the app
if __name__ == "__main__":
    demo.launch(server_port=7860, share=False)