demo / app.py
echoyzd's picture
Create app.py
12ec01c
raw
history blame contribute delete
666 Bytes
import gradio as gr
def greet(name: str) -> str:
return f"hello {name}!"
class App:
def __init__(self) -> None:
self.demo = None
self.init()
def init(self):
with gr.Blocks(css="#waring {color: red} .feedback {font-size: 24px}") as self.demo:
# gr.Markdown(" # \N{glowing start}Gradio教程 ")
# gr.Markdown(" # \NGradio教程 ")
gr.Interface(
fn=greet,
inputs="text",
outputs="text"
)
self.demo.queue(concurrency_count=20).launch(share=True)
if __name__ == "__main__":
app = App()