Spaces:
Sleeping
Sleeping
| import gradio as gr | |
| from channels.channel import Event, Channel | |
| from type import TYPES | |
| class View: | |
| def __init__(self, channel: Channel): | |
| self.channel = channel | |
| self.channel.on('render', self.render) | |
| self.channel.on('update', self.update) | |
| def render(self): | |
| with gr.Blocks() as demo: | |
| gr.Markdown("## Welcome to VIPER Architecture") | |
| gr.Markdown("This is a sample view rendering.") | |
| demo.launch() | |
| def update(self, content: str): | |
| with gr.Blocks() as demo: | |
| gr.Markdown("## Welcome to VIPER Architecture") | |
| gr.Markdown(content) | |
| demo.launch() |