File size: 451 Bytes
1a9537b
bf163a2
1a9537b
bf163a2
 
1a9537b
 
 
 
 
 
 
 
 
 
 
 
14c1c76
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import gradio as gr
import pathlib


print(pathlib.Path.cwd())
block = gr.Blocks()

def run(text):
  return text

with block: 
  text = gr.Textbox(label="Enter your prompt", show_label=False, max_lines=1)
  textout = gr.Textbox(show_label=False, max_lines=1)
  btn = gr.Button("Run")
  text.submit(run, inputs=text, outputs=textout)
  btn.click(run, inputs=text, outputs=textout)

block.queue(max_size=2, concurrency_count=2).launch(enable_queue=True)