Spaces:
Sleeping
Sleeping
Create app.py
Browse files
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()
|