Spaces:
Running
Running
Istvan-Adem
commited on
Commit
·
8b0e3f2
1
Parent(s):
6278824
add ai
Browse files- ocr/api/message/prompts.py +18 -13
ocr/api/message/prompts.py
CHANGED
@@ -1,22 +1,27 @@
|
|
1 |
class OCRPrompts:
|
2 |
-
generate_general_answer = """
|
3 |
|
4 |
-
**
|
5 |
-
1. **Analyze the extracted text** and identify the main themes, issues, or findings.
|
6 |
-
2. **Structure the report** into the following sections:
|
7 |
-
- **Simple Overview:** A brief summary of the key points in the extracted text.
|
8 |
-
- **Conclusion:** A succinct evaluation or interpretation of the findings, including any necessary recommendations or next steps.
|
9 |
|
10 |
-
|
11 |
-
|
|
|
12 |
|
13 |
-
**Format Example:**
|
14 |
```markdown
|
15 |
-
## Simple Overview of the Report
|
16 |
|
17 |
-
[Provide a brief and clear summary of the main points from the extracted text.]
|
18 |
|
19 |
## Conclusion
|
20 |
|
21 |
-
[Summarize key insights and provide any recommendations based on the findings.]
|
22 |
-
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
class OCRPrompts:
|
2 |
+
generate_general_answer = """## Task
|
3 |
|
4 |
+
You must analyze the text extracted from medical document and generate a simple overview in **Markdown2** format. Your output must strictly follow the required format.
|
|
|
|
|
|
|
|
|
5 |
|
6 |
+
## Report Structure
|
7 |
+
|
8 |
+
The report should be structured as follows, with each section containing only relevant information from the document:
|
9 |
|
|
|
10 |
```markdown
|
11 |
+
## Simple Overview of the CT Report
|
12 |
|
13 |
+
[Provide a brief and clear medical summary of the main points from the extracted text.]
|
14 |
|
15 |
## Conclusion
|
16 |
|
17 |
+
[Summarize key insights and provide any recommendations based on the findings in 2 sentences.]
|
18 |
+
```
|
19 |
+
|
20 |
+
[INST]
|
21 |
+
|
22 |
+
## Instructions
|
23 |
+
|
24 |
+
- **Do not invent or infer any information.** Only use data provided in the user request.
|
25 |
+
- Ensure that the format is followed strictly, and the output is complete without any deviations.
|
26 |
+
|
27 |
+
[/INST]"""
|