serhatderya commited on
Commit
3a2fa99
1 Parent(s): f6f2abf

Update app_scribble.py

Browse files
Files changed (1) hide show
  1. app_scribble.py +3 -2
app_scribble.py CHANGED
@@ -1,6 +1,7 @@
1
  #!/usr/bin/env python
2
 
3
  import gradio as gr
 
4
 
5
  from settings import (DEFAULT_IMAGE_RESOLUTION, DEFAULT_NUM_IMAGES,
6
  MAX_IMAGE_RESOLUTION, MAX_NUM_IMAGES, MAX_SEED)
@@ -12,8 +13,8 @@ def magic_prompt(prompt):
12
  completion = openai.ChatCompletion.create(
13
  model="gpt-3.5-turbo",
14
  messages=[
15
- {"role": "system", "content": "You are a helpful assistant."},
16
- {"role": "user", "content": "Hello!"}
17
  ]
18
  )
19
 
 
1
  #!/usr/bin/env python
2
 
3
  import gradio as gr
4
+ import openai
5
 
6
  from settings import (DEFAULT_IMAGE_RESOLUTION, DEFAULT_NUM_IMAGES,
7
  MAX_IMAGE_RESOLUTION, MAX_NUM_IMAGES, MAX_SEED)
 
13
  completion = openai.ChatCompletion.create(
14
  model="gpt-3.5-turbo",
15
  messages=[
16
+ {"role": "system", "content": "You are a rephraser."},
17
+ {"role": "user", "content": "You will be rephrasing the given details (details will be given in triple backticks) about an object/product. For example if “gray metal moka pot with black holder on wooden surface” is the given details, it should be rephrased as “moka pot, gray metal body, black holder, on wooden surface”. Output should be in coma separated form. Don’t add any comment and additional feature. Just give 1 output at a time. The given details “””{prompt}”””".format(prompt=prompt)}
18
  ]
19
  )
20