JUNGU commited on
Commit
0468ba6
Β·
verified Β·
1 Parent(s): f5ebeb5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -2,6 +2,7 @@ import streamlit as st
2
  import pandas as pd
3
  import openai
4
  import os
 
5
 
6
  # OpenAI API μ„€μ •
7
  openai.api_key = os.getenv("OPENAI_API_KEY")
@@ -24,7 +25,7 @@ def generate_living_record(data):
24
  model="gpt-3.5-turbo-16k",
25
  messages=[
26
  {"role": "system",
27
- "content": "ν•™μƒμ˜ 이전 μƒν™œκΈ°λ‘λΆ€λ₯Ό λ°”νƒ•μœΌλ‘œ, λ‹€μŒ ν•™λ…„λ„μ˜ 쒅합적인 μ„±μž₯κ³Ό λ°œλ‹¬μ„ κ°•μ‘°ν•˜λŠ” μƒν™œκΈ°λ‘λΆ€λ₯Ό μž‘μ„±ν•©λ‹ˆλ‹€. 예λ₯Ό λ“€μ–΄, λ§ˆμ§€λ§‰ μ˜ˆμ‹œκ°€ ν˜„μž¬ 1학년이라면, 2학년에 ν•΄λ‹Ήν•˜λŠ” λ‚΄μš©μ„ μž‘μ„±ν•˜μ„Έμš”. ν•™μ—… μ„±κ³Ό, 인성, μ°½μ˜μ„±, 그리고 ν•™μƒμ˜ μ „λ°˜μ μΈ λ°œλ‹¬μ„ μ–ΈκΈ‰ν•©λ‹ˆλ‹€. λ¬Έμž₯은 '학생은'으둜 μ‹œμž‘ν•˜μ§€ μ•ŠλŠ” ν˜•νƒœλ‘œ μ‹œμž‘ν•˜κ³  λ¬Έμž₯ λ§ˆλ¬΄λ¦¬λŠ” λ°˜λ“œμ‹œ '~함,~음,~μž„' ν˜•νƒœλ‘œ μ’…κ²°ν˜• μ–΄λ―Έλ₯Ό μ‚¬μš©ν•©λ‹ˆλ‹€. μ΄λŸ¬ν•œ λ°©μ‹μœΌλ‘œ ν•™μƒμ˜ λ‹€μŒ 학년도에 λŒ€ν•œ λ°œμ „κ³Ό κΈ°λŒ€λ₯Ό λ°˜μ˜ν•˜μ„Έμš”."
28
  },
29
  {"role": "user",
30
  "content": data_str
 
2
  import pandas as pd
3
  import openai
4
  import os
5
+ import instructions
6
 
7
  # OpenAI API μ„€μ •
8
  openai.api_key = os.getenv("OPENAI_API_KEY")
 
25
  model="gpt-3.5-turbo-16k",
26
  messages=[
27
  {"role": "system",
28
+ "content": instructions.instruction
29
  },
30
  {"role": "user",
31
  "content": data_str