seawolf2357 commited on
Commit
01a4535
Β·
verified Β·
1 Parent(s): 57f947a

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -0
app.py ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+
3
+ def hello_world(input_text):
4
+ # μž…λ ₯값을 λ°›μ•„μ„œ "world"λ₯Ό ν¬ν•¨ν•˜μ—¬ λ°˜ν™˜ν•©λ‹ˆλ‹€
5
+ return f"{input_text}, world!"
6
+
7
+ # Gradio μΈν„°νŽ˜μ΄μŠ€ 생성
8
+ demo = gr.Interface(
9
+ fn=hello_world,
10
+ inputs=gr.Textbox(placeholder="ν…μŠ€νŠΈλ₯Ό μž…λ ₯ν•˜μ„Έμš”..."),
11
+ outputs="text",
12
+ title="Hello World App",
13
+ description="μž…λ ₯ν•œ ν…μŠ€νŠΈμ— 'world'λ₯Ό μΆ”κ°€ν•˜μ—¬ λ°˜ν™˜ν•©λ‹ˆλ‹€."
14
+ )
15
+
16
+ # μ• ν”Œλ¦¬μΌ€μ΄μ…˜ μ‹€ν–‰
17
+ if __name__ == "__main__":
18
+ demo.launch()