Spaces:
Sleeping
Sleeping
Raj Jayendrakumar Muchhala
commited on
Commit
·
2a09216
1
Parent(s):
2ef1f15
change the output format and prompt for clipper
Browse files- clipper_prompts.py +15 -11
clipper_prompts.py
CHANGED
|
@@ -7,25 +7,29 @@ Your task is to extract verbatim segments from the transcript for a given clip p
|
|
| 7 |
- **Duration Target:** The desired duration for the clip.
|
| 8 |
|
| 9 |
Instructions to follow when extracting verbatim segments from the transcript are as follows:
|
| 10 |
-
1.
|
| 11 |
-
2.
|
| 12 |
-
3.
|
| 13 |
-
4. Duration Rules:
|
| 14 |
- Use the Duration Target as a guideline to select the most relevant content.
|
| 15 |
- Aim to extract transcript segments that roughly match the target duration.
|
| 16 |
-
- If the available relevant content is naturally shorter than the duration target, extract only what is relevant, do not force inclusion of irrelevant content solely to reach the target duration.
|
|
|
|
| 17 |
|
| 18 |
### **OUTPUT:**
|
| 19 |
-
|
| 20 |
```
|
| 21 |
{
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
}
|
| 27 |
```
|
| 28 |
-
|
| 29 |
'''
|
| 30 |
|
| 31 |
CLIPPER_USER_MESSAGE = '''
|
|
|
|
| 7 |
- **Duration Target:** The desired duration for the clip.
|
| 8 |
|
| 9 |
Instructions to follow when extracting verbatim segments from the transcript are as follows:
|
| 10 |
+
1. Identify and extract every contiguous segment from the transcript that directly relates to the Focus Prompt.
|
| 11 |
+
2. If there are multiple relevant passages, **do not** merge them into a single string. Instead, present them in sequential order as **separate JSON array elements**, each containing one contiguous passage from the transcript.
|
| 12 |
+
3. Duration Rules:
|
|
|
|
| 13 |
- Use the Duration Target as a guideline to select the most relevant content.
|
| 14 |
- Aim to extract transcript segments that roughly match the target duration.
|
| 15 |
+
- If the available relevant content is naturally shorter than the duration target, extract only what is relevant, do not force inclusion of irrelevant content solely to reach the target duration.
|
| 16 |
+
4. Return these passages **exactly** as they appear (verbatim) from the source.
|
| 17 |
|
| 18 |
### **OUTPUT:**
|
| 19 |
+
Return a JSON object with **only** the key `"Regions"`, where the value is an **array** of objects.
|
| 20 |
```
|
| 21 |
{
|
| 22 |
+
"Regions": [
|
| 23 |
+
{
|
| 24 |
+
"region": "Exact verbatim text of the first relevant passage."
|
| 25 |
+
},
|
| 26 |
+
{
|
| 27 |
+
"region": "Exact verbatim text of the second relevant passage."
|
| 28 |
+
},
|
| 29 |
+
....
|
| 30 |
+
]
|
| 31 |
}
|
| 32 |
```
|
|
|
|
| 33 |
'''
|
| 34 |
|
| 35 |
CLIPPER_USER_MESSAGE = '''
|