JUNGU commited on
Commit
5648c71
·
1 Parent(s): 41c50fc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -34,10 +34,10 @@ def infer(image_input, audience):
34
 
35
 
36
  llama_q = f"""
37
- I'll give you a simple image caption, please provide a fictional story for a {audience} audience that would fit well with the image. Please be creative, do not worry and only generate a cool fictional story.
38
  Here's the image description:
39
  '{clipi_result[0]}'
40
- 한국어로 답변해줘.
41
 
42
  """
43
  gr.Info('Calling ChatGPT, 이야기를 만들고 있습니다...')
@@ -46,7 +46,7 @@ def infer(image_input, audience):
46
  # "I2S",
47
  # api_name="/predict"
48
  #)
49
- chat_completion = openai.ChatCompletion.create(model="gpt-3.5-turbo", messages=[{"role": "user", "content": llama_q}])
50
  result = chat_completion.choices[0].message.content
51
 
52
  print(f"Llama2 result: {result}")
 
34
 
35
 
36
  llama_q = f"""
37
+ You are now a professional short story writer. I'll give you a simple image caption, please provide a fictional story for a {audience} audience that would fit well with the image. Please be creative, do not worry and only generate a cool fictional story.
38
  Here's the image description:
39
  '{clipi_result[0]}'
40
+ 한국어로 답변해줘. 이야기를 3줄로 요약해줘
41
 
42
  """
43
  gr.Info('Calling ChatGPT, 이야기를 만들고 있습니다...')
 
46
  # "I2S",
47
  # api_name="/predict"
48
  #)
49
+ chat_completion = openai.ChatCompletion.create(model="gpt-3.5-turbo-16k", messages=[{"role": "user", "content": llama_q}])
50
  result = chat_completion.choices[0].message.content
51
 
52
  print(f"Llama2 result: {result}")