File size: 614 Bytes
738819d
 
83ebcb8
 
 
738819d
83ebcb8
 
 
06cde0f
83ebcb8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import gradio as gr

# Replace this with your actual model inference
def predict(text):
    return f"Model output: {text}"

with gr.Blocks() as demo:
    
    # Small greeting text
    gr.Markdown("## hi there")
    
    # Big text input
    input_text = gr.Textbox(
        placeholder="share a piece of your writing",
        lines=10,
        label=""
    )
    
    # Button
    submit_btn = gr.Button("Submit")
    
    # Output (optional, but useful)
    output = gr.Textbox(label="Output")

    # Connect button → function
    submit_btn.click(fn=predict, inputs=input_text, outputs=output)

demo.launch()