laxsvips commited on
Commit
a385a57
1 Parent(s): 326d130

Update chat.py

Browse files
Files changed (1) hide show
  1. chat.py +1 -2
chat.py CHANGED
@@ -165,8 +165,7 @@ def generate_image_prompt(game_id, user_id, user_input):
165
  if 'You have a manual' in user_input:
166
  user_input = user_input.replace('You have a manual of this newly created simulation in your mind. Now what is the first thing you will do in this world?', '')
167
  payload = list()
168
- prompt_data = "You are an expert in generating prompts for Midjourney. Generate a prompt for the scene <<PROMPT_FOR_IMG>> in 50 words. Your prompt should not contain any double quotes or colons or headers. You should include a subject (the main focus of the visual), what the subject is doing, where, and how, along with additional descriptive words to describe the rendering's visual style for the scene."
169
- file_data = prompt_data.replace("<<PROMPT_FOR_IMG>>", user_input)
170
  leo_input_msg = call_gpt(file_data)
171
  leo_input = leo_input_msg.choices[0].message.content
172
  timestamp_op = time()
 
165
  if 'You have a manual' in user_input:
166
  user_input = user_input.replace('You have a manual of this newly created simulation in your mind. Now what is the first thing you will do in this world?', '')
167
  payload = list()
168
+ file_data = open_file(f"{file_path}/image_prompt_leo.txt").replace("<<PROMPT_FOR_IMG>>", user_input)
 
169
  leo_input_msg = call_gpt(file_data)
170
  leo_input = leo_input_msg.choices[0].message.content
171
  timestamp_op = time()