File size: 504 Bytes
01a4535
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import gradio as gr

def hello_world(input_text):
    # μž…λ ₯값을 λ°›μ•„μ„œ "world"λ₯Ό ν¬ν•¨ν•˜μ—¬ λ°˜ν™˜ν•©λ‹ˆλ‹€
    return f"{input_text}, world!"

# Gradio μΈν„°νŽ˜μ΄μŠ€ 생성
demo = gr.Interface(
    fn=hello_world,
    inputs=gr.Textbox(placeholder="ν…μŠ€νŠΈλ₯Ό μž…λ ₯ν•˜μ„Έμš”..."),
    outputs="text",
    title="Hello World App",
    description="μž…λ ₯ν•œ ν…μŠ€νŠΈμ— 'world'λ₯Ό μΆ”κ°€ν•˜μ—¬ λ°˜ν™˜ν•©λ‹ˆλ‹€."
)

# μ• ν”Œλ¦¬μΌ€μ΄μ…˜ μ‹€ν–‰
if __name__ == "__main__":
    demo.launch()