arxivgpt kim commited on
Create app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
|
| 3 |
+
def create_content(purpose, audience, tone, word_count, style, format_type):
|
| 4 |
+
# ๋ด์ฉ ์ฐฝ์ ๋ก์ง์ ์ฌ๊ธฐ์ ๊ตฌํํฉ๋๋ค. ์๋ฅผ ๋ค์ด, ์
๋ ฅ๋ฐ์ ์ ๋ณด๋ฅผ ๋ฐํ์ผ๋ก ์ ์ ํ ๋ด์ฉ์ ์์ฑํฉ๋๋ค.
|
| 5 |
+
content = f"์ฌ๊ธฐ์ ์์ฑ๋ ๋ด์ฉ์ด ํ์๋ฉ๋๋ค. ๋ชฉ์ : {purpose}, ๋์ ์ฒญ์ค: {audience}, ํค: {tone}, ๋จ์ด ์: {word_count}, ์คํ์ผ: {style}, ํ์: {format_type}"
|
| 6 |
+
return content
|
| 7 |
+
|
| 8 |
+
with gr.Interface(fn=create_content,
|
| 9 |
+
inputs=[gr.Textbox(label="๋ชฉ์ "),
|
| 10 |
+
gr.Textbox(label="๋์ ์ฒญ์ค"),
|
| 11 |
+
gr.Dropdown(choices=["๊ณต์์ ์ธ", "๋น๊ณต์์ ์ธ", "์ค๋๋ ฅ ์๋"], label="ํค"),
|
| 12 |
+
gr.Number(label="๋จ์ด ์"),
|
| 13 |
+
gr.Textbox(label="์คํ์ผ"),
|
| 14 |
+
gr.Dropdown(choices=["๋ธ๋ก๊ทธ ํฌ์คํธ", "๋ณด๋ ์๋ฃ", "๊ธฐ์ฌ"], label="์ฝํ
์ธ ํ์")],
|
| 15 |
+
outputs="text",
|
| 16 |
+
title="Write For Me - ์ฝํ
์ธ ์์ฑ๊ธฐ",
|
| 17 |
+
description="์ฌ์ฉ์์ ์๊ตฌ์ฌํญ์ ๋ง์ถฐ ์ฝํ
์ธ ๋ฅผ ์์ฑํฉ๋๋ค.") as interface:
|
| 18 |
+
interface.launch()
|