seawolf2357 commited on
Commit
489fbb5
Β·
verified Β·
1 Parent(s): 2eb80d1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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"λ™μ˜μƒμ— μ‚¬μš©ν•  전문적인 λ‚˜λ ˆμ΄μ…˜μ„ μž‘μ„±ν•˜λΌ. λ°˜λ“œμ‹œ ν•œκΈ€λ‘œ μž‘μ„±ν• κ²ƒ. 일체의 μ§€λ¬Έμ΄λ‚˜ μ§€μ‹œ, λ°°κ²½ μ„€λͺ… 등을 λ…ΈμΆœ ν•˜κ±°λ‚˜ 좜λ ₯ν•˜μ§€ 말고 μˆœμˆ˜ν•œ λ‚˜λ ˆμ΄μ…˜λ§Œ 2쀄씩 λ¬Άμ–΄μ„œ μ΅œλŒ€ 20쀄 μ΄λ‚΄λ‘œ 좜λ ₯λ ₯. μž…λ ₯: '{inputs}'"
9
 
10
  headers = {
11
  "Content-Type": "application/json",
@@ -18,7 +18,7 @@ def predict(inputs, top_p, temperature, openai_api_key):
18
  "temperature": temperature,
19
  "top_p": top_p,
20
  "n": 1,
21
- "max_tokens": 1000
22
  }
23
 
24
  response = requests.post(API_URL, headers=headers, json=payload)
 
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쀄씩 λ¬Άμ–΄μ„œ μ΅œλŒ€ 40쀄 μ΄λ‚΄λ‘œ 좜λ ₯. μ˜μƒμš© 슀크립트λ₯Ό ν•œκΈ€λ‘œ μž‘μ„±ν•˜λ˜, μ ˆλŒ€ μ§€μ‹œλ¬Έμ΄λ‚˜ 의견 등을 ν¬ν•¨ν•˜μ§€ 말것. 제λͺ©μ€ μ˜λ¬Έν˜•μœΌλ‘œ ν₯λ―Έλ₯Ό μžκ·Ήν•˜λŠ” λ‚΄μš©μœΌλ‘œ 할것. 제λͺ©μ€ 메인 ν‚€μ›Œλ“œμ™€ λ”•μ…”λ„ˆλ¦¬μ˜ 랜덀 μ‘°ν•© 결과둜 할것. λ‚΄μš©μ€ 제λͺ©μ„ 기반으둜 할것. ν‚€μ›Œλ“œκ°„ 상관 관계 찾을것. μ‹ ν™”, 역사, κ³Όν•™, λ¬Έν•™, μ˜ν™”, μŒμ•…, 미술, μ „μŸ, 유머, 속담, λͺ…μ–Έ 쀑 ν•˜λ‚˜μ˜ κ΄€λ ¨ 'μ˜ˆμ‹œ'λ₯Ό λ°˜λ“œμ‹œ 듀어보일것. μ˜ˆμ‹œλŠ” λ§Œμ•½ 'λ©”μΈν‚€μ›Œλ“œ'κ°€ 'νƒˆλͺ¨'이고 'λ”•μ…”λ„ˆλ¦¬'(사과, 야ꡬ, 술, μ—°μ• , μ—¬μž, 아이, 개, 고양이, λͺ©μš•, 온천)이닀. μž…λ ₯: '{inputs}'"
9
 
10
  headers = {
11
  "Content-Type": "application/json",
 
18
  "temperature": temperature,
19
  "top_p": top_p,
20
  "n": 1,
21
+ "max_tokens": 4000
22
  }
23
 
24
  response = requests.post(API_URL, headers=headers, json=payload)