Add askme.py
Browse files
askme.py
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
|
| 3 |
+
def answer_question(question):
|
| 4 |
+
# ์ฌ๊ธฐ์ ์ง๋ฌธ์ ๋ํ ๋ต๋ณ ๋ก์ง์ ๊ตฌํํฉ๋๋ค.
|
| 5 |
+
# ์์๋ก ๊ฐ๋จํ ๋ต๋ณ์ ๋ฐํํฉ๋๋ค.
|
| 6 |
+
return f"๋ชฐ๋ผ์"
|
| 7 |
+
|
| 8 |
+
demo = gr.Interface(
|
| 9 |
+
fn=answer_question,
|
| 10 |
+
inputs="text",
|
| 11 |
+
outputs="text",
|
| 12 |
+
title="๋ฌด์์ด๋ ๋ฌผ์ด๋ณด์, ๋ด๊ฐ ์๋?",
|
| 13 |
+
description="์ง๋ฌธ์ ์
๋ ฅํ๋ฉด ๋ต๋ณ์ ์ ๊ณตํ ๊ฒ ๊ฐ๋? <b><span style=\"color:red;\">ใ
ใ
ใ
</span></b> <br/> <img src=https://ppss.kr/wp-content/uploads/2016/10/2-7.jpg>",
|
| 14 |
+
examples=[
|
| 15 |
+
["์ค๋ ๋ ์จ ์ด๋?"],
|
| 16 |
+
["์ธ๊ณต์ง๋ฅ์ด ๋ญ์ผ?"],
|
| 17 |
+
["ํ์ด์ฌ์ ์ด๋ค ์ธ์ด์ผ?"],
|
| 18 |
+
["๊ทธ๋ฅ ์๋ฌด๊ฑฐ๋ ๋ฌผ์ด๋ด"]
|
| 19 |
+
]
|
| 20 |
+
)
|
| 21 |
+
demo.launch(share=True)
|