Update README.md
Browse files
README.md
CHANGED
@@ -136,9 +136,9 @@ You can see that sometimes the role names are not consistent (e.g., 德丽莎女
|
|
136 |
```
|
137 |
PROMPT = """This is an image of RPG game. Given associated OCR result, please help us identify the existence of story narrations and dialogues and extract them in structured format.
|
138 |
This is the associated OCR results:
|
139 |
-
|
140 |
{ocr}
|
141 |
-
|
142 |
|
143 |
There are two types of story content you should extract:
|
144 |
|
@@ -156,34 +156,34 @@ Please output your response in JSON structure in one of the 3 following ways:
|
|
156 |
|
157 |
1. In case of no desired content (neither dialogue nor narration), output a JSON dict whose type is null.
|
158 |
|
159 |
-
|
160 |
{{"type": null}}
|
161 |
-
|
162 |
|
163 |
2. In case of dialogue
|
164 |
|
165 |
-
|
166 |
{{
|
167 |
"type": "dialogue",
|
168 |
"role": "<speaker name>",
|
169 |
"content": "<spoken content>",
|
170 |
"state": "<state/environment info, null if there isn't any>"
|
171 |
}}
|
172 |
-
|
173 |
|
174 |
3. In case of narration
|
175 |
|
176 |
-
|
177 |
{{
|
178 |
"type": "narration",
|
179 |
"content": "<narrative content>"
|
180 |
}}
|
181 |
-
|
182 |
```
|
183 |
|
184 |
# VLM code snippet
|
185 |
|
186 |
-
```
|
187 |
# generate
|
188 |
for batch in tqdm(batches):
|
189 |
msgs = [
|
|
|
136 |
```
|
137 |
PROMPT = """This is an image of RPG game. Given associated OCR result, please help us identify the existence of story narrations and dialogues and extract them in structured format.
|
138 |
This is the associated OCR results:
|
139 |
+
\`\`\`ocr
|
140 |
{ocr}
|
141 |
+
\`\`\`
|
142 |
|
143 |
There are two types of story content you should extract:
|
144 |
|
|
|
156 |
|
157 |
1. In case of no desired content (neither dialogue nor narration), output a JSON dict whose type is null.
|
158 |
|
159 |
+
\`\`\`json
|
160 |
{{"type": null}}
|
161 |
+
\`\`\`
|
162 |
|
163 |
2. In case of dialogue
|
164 |
|
165 |
+
\`\`\`json
|
166 |
{{
|
167 |
"type": "dialogue",
|
168 |
"role": "<speaker name>",
|
169 |
"content": "<spoken content>",
|
170 |
"state": "<state/environment info, null if there isn't any>"
|
171 |
}}
|
172 |
+
\`\`\`
|
173 |
|
174 |
3. In case of narration
|
175 |
|
176 |
+
\`\`\`json
|
177 |
{{
|
178 |
"type": "narration",
|
179 |
"content": "<narrative content>"
|
180 |
}}
|
181 |
+
\`\`\`"""
|
182 |
```
|
183 |
|
184 |
# VLM code snippet
|
185 |
|
186 |
+
```python
|
187 |
# generate
|
188 |
for batch in tqdm(batches):
|
189 |
msgs = [
|