juancopi81 commited on
Commit
ec49feb
1 Parent(s): 82c7c76

Change GPT prompt

Browse files
Files changed (1) hide show
  1. textprocessor.py +7 -13
textprocessor.py CHANGED
@@ -5,20 +5,14 @@ from typing import Dict
5
  import openai
6
 
7
  context_prompt = """
8
-
9
- You are a creator of ilustraded books building a series of scenes for your book.
10
- Your boss asked you to write a summary and the illustrations of the following text:
11
-
12
  $TRANSCRIPTION
13
-
14
- You have to write the summary using a maximum of 7 scenes, and using the following JSON format:
15
-
16
- Write your answer in JSON format that has: The number of the scene, the summary for each scene, and the Illustration for each scene.
17
- The value for "Summary" should be in Spanish and it should not be longer than 30 words.
18
- The value for "Illustration" should be in English and no longer than 20 words. It should have a detail description of an illustration for this scene in English with many details, and a artistic style for the illustration that matches the text.
19
-
20
- Just answer with the JSON object, so your boss can easily parse it.
21
-
22
  """
23
 
24
  openai.api_key = os.getenv("SECRET_KEY_OPENAI")
 
5
  import openai
6
 
7
  context_prompt = """
8
+ You are a creator of illustrated books building a series of scenes for your book.
9
+ Your boss asked you to write a summary and illustrations of this text:
 
 
10
  $TRANSCRIPTION
11
+ You have to write the summary using a maximum of 7 scenes in a JSON object with these keys:
12
+ "Scene": The number of the scene.
13
+ "Summary": Spanish string with a summary of the scene. It should be in Spanish, and it should be less than 30 words. Readers should understand it without looking at the illustration.
14
+ "Illustration": English string with a detailed English description of an illustration for this scene. It must be written in English and in less than 20 words. It should include many details and an artistic style for the image that matches the text.
15
+ Just answer with the JSON object:
 
 
 
 
16
  """
17
 
18
  openai.api_key = os.getenv("SECRET_KEY_OPENAI")