File size: 312 Bytes
fe97494
 
 
 
 
9ef5d40
5198906
fe97494
1f2cd00
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import gradio as gr
import time

def generate():
    text = "Hello, this is a demo without using streaming that emulates a model"
    time.sleep(2.4)
    return text

with gr.Blocks() as demo:
    btn = gr.Button("Generate")
    out = gr.Textbox()
    btn.click(fn=generate, outputs=out)

demo.launch(debug=True)