Spaces:
Running
Running
import os | |
import gradio as gr | |
os.system("pip install --upgrade gradio") | |
head = """ | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<!-- Twitter Card metadata --> | |
<meta name="twitter:card" content="player"> | |
<meta name="twitter:site" content="@broadfield-dev"> | |
<meta name="twitter:title" content="Gradio Sketch Demo"> | |
<meta name="twitter:description" content="No-Code Gradio App Builder - Demo"> | |
<meta name="twitter:image" content="https://your-domain.com/preview-image.jpg"> | |
<meta name="twitter:player" content="https://broadfield-dev-gradio-sketch.hf.space"> | |
<meta name="twitter:player:width" content="480"> | |
<meta name="twitter:player:height" content="480"> | |
<meta name="twitter:player:stream" content="https://broadfield-dev-gradio-sketch.hf.space"> | |
<title>Gradio Sketch Demo</title> | |
""" | |
def demo(): | |
os.system("gradio sketch") | |
with gr.Blocks(head=head) as app: | |
app.load(demo,None,None) | |
app.launch(server_port=7861) |