Spaces:
Build error
Build error
juancopi81
commited on
Commit
•
1852dbe
1
Parent(s):
4a77e53
Ensure similar start of the JSON object
Browse files- textprocessor.py +5 -1
textprocessor.py
CHANGED
@@ -8,11 +8,15 @@ 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
|
|
|
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")
|
|
|
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 following these instructions:
|
12 |
+
{"Scene": int, "Summary": Spanish str, "Illustration": English str} where:
|
13 |
"Scene": The number of the scene.
|
14 |
"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.
|
15 |
"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.
|
16 |
Just answer with the JSON object:
|
17 |
+
{
|
18 |
+
"Scene": 1,
|
19 |
+
"Summary": "
|
20 |
"""
|
21 |
|
22 |
openai.api_key = os.getenv("SECRET_KEY_OPENAI")
|