Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -5,7 +5,7 @@ import json
|
|
5 |
API_URL = "https://api.openai.com/v1/chat/completions"
|
6 |
|
7 |
def predict(inputs, top_p, temperature, openai_api_key):
|
8 |
-
narration_prompt = f"๋์์์ ์ฌ์ฉํ ์ ๋ฌธ์ ์ธ ๋๋ ์ด์
์ ์์ฑํ๋ผ. ๋ฐ๋์ ํ๊ธ๋ก ์์ฑํ ๊ฒ.
|
9 |
|
10 |
headers = {
|
11 |
"Content-Type": "application/json",
|
|
|
5 |
API_URL = "https://api.openai.com/v1/chat/completions"
|
6 |
|
7 |
def predict(inputs, top_p, temperature, openai_api_key):
|
8 |
+
narration_prompt = f"๋์์์ ์ฌ์ฉํ ์ ๋ฌธ์ ์ธ ๋๋ ์ด์
์ ์์ฑํ๋ผ. ๋ฐ๋์ ํ๊ธ๋ก ์์ฑํ ๊ฒ. ์ผ์ฒด์ ์ง๋ฌธ์ด๋ ์ง์, ๋ฐฐ๊ฒฝ ์ค๋ช
๋ฑ์ ๋
ธ์ถ ํ๊ฑฐ๋ ์ถ๋ ฅํ์ง ๋ง๊ณ ์์ํ ๋๋ ์ด์
๋ง 2์ค์ฉ 3๊ฐ๋ฅผ ๋ฌถ์ด์ 1๋ฌธ๋จ์ ๊ตฌ์ฑํ๊ณ , ์ต๋ 30์ค ์ด๋ด๋ก ์ถ๋ ฅํ ๊ฒ. ์ ๋ชฉ์ ์๋ฌธํ์ผ๋ก ํฅ๋ฏธ๋ฅผ ์๊ทนํ๋ ๋ด์ฉ์ผ๋ก ํ ๊ฒ(์์ '์ ํ์ ์ผ์์ ํ์ ๋จธ๋ฆฌ์นด๋ฝ์์ ๋์์๊น?'). ์ ๋ชฉ์ '๋ฉ์ธํค์๋'์ '์ฐ๊ด์ฑ'์ ๋๋ค ์กฐํฉ ๊ฒฐ๊ณผ๋ก ํ ๊ฒ. ๋ด์ฉ์ ์ ๋ชฉ์ ๊ธฐ๋ฐ์ผ๋ก ํ๋, '์ฐ๊ด์ฑ'์ ๋ฐ์ํ์ฌ ๊ธฐ์น์ ๊ฒฐ์ ๊ตฌ์กฐ๋ก 4๊ฐ์ ๋ฌธ๋จ์ผ๋ก ์์ฑํ ๊ฒ. '๋ฉ์ธํค์๋'์ '์ฐ๊ด์ฑ'๊ฐ์ ์๊ด ๊ด๊ณ๋ฅผ ์ฐพ์์ ๊ทธ ์ด์ ๋ฅผ ๋
ผ๋ฆฌ์ ์ผ๋ก ์ค๋ช
ํ๋ ์์ฌ๋ฅผ ์์ฑํ ๊ฒ. '์ฐ๊ด์ฑ'์ '์ ํ, ์ญ์ฌ, ๊ณผํ, ๊ฒฝ์ , ์ฌํ, ๋ฏธ์ฉ, ๋ฌธํ, ์ํ, ์์
, ๋ฏธ์ , ์ ์, ์ ๋จธ, ์๋ด, ๋ช
์ธ'์ผ๋ก ๊ตฌ์ฑํ์ฌ ๊ฐ๊ฐ์ ๊ด๋ จ '์์'๋ฅผ ๋ฐ๋์ ๋ค์ด๋ณด์ผ๊ฒ. ์
๋ ฅ: '{inputs}'"
|
9 |
|
10 |
headers = {
|
11 |
"Content-Type": "application/json",
|