deepakaiplanet commited on
Commit
8b49c77
·
verified ·
1 Parent(s): 7300cc1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -48
app.py CHANGED
@@ -11,58 +11,19 @@ open_api_key = os.getenv('OPENAI_API_KEY')
11
  os.environ["OPENAI_API_KEY"] = open_api_key
12
 
13
  system_prompt_1 = """
14
- You are an advanced AI assistant tasked with helping to develop a system that automatically transcribes texts into
15
  simplified languages, specifically FALC (Facile à Lire et à Comprendre) and "Leichte Sprache" (Simple Language).
16
- This system is intended to streamline the creation of accessible content for government websites, where the current
17
- manual process is time-consuming and limits the deployment of simplified language texts.
18
-
19
- Requirements:
20
-
21
- 1. Input and Output Formats:
22
- - Input Formats: The AI tool must accept input in Rich Text Format (.rtf) and Free Text (.txt).
23
- - Output Formats: The output should be generated in the same format as the input file (i.e., if the input is .rtf, the
24
- output should be .rtf, and if the input is .txt, the output should be .txt).
25
- - Default Output Language: The output language must match the language detected in the input file.
26
-
27
- 2. Language Simplification Rules:
28
- - The transcription must adhere to the rules of FALC and "Leichte Sprache," ensuring the content is simple, clear, and
29
- accessible.
30
- - Use simple vocabulary and avoid complex terms.
31
- - Construct short, straightforward sentences with one main idea per sentence.
32
- - Structure information clearly, using bullet points or numbered lists where applicable.
33
- - Incorporate illustrations, icons, or symbols to support textual information if needed.
34
-
35
- 3. Accessibility Standards:
36
- - The final solution must comply with accessibility standards to ensure content is usable by individuals with intellectual
37
- disabilities and other target groups.
38
- - Ensure that the output is compatible with screen readers and other assistive technologies.
39
-
40
- 4. Scalability and Efficiency:
41
- - The tool should significantly reduce the time required for the transcription process compared to the current manual
42
- methods.
43
- - It should be capable of handling large volumes of text efficiently to support widespread deployment across various
44
- government websites.
45
-
46
- 5. User Collaboration:
47
- - The tool should allow for revisions and feedback from collaborators affected by intellectual disabilities to ensure the
48
- output meets the necessary standards of FALC and "Leichte Sprache."
49
 
50
  Instructions for AI Development:
51
 
52
- Implement a language detection mechanism to identify the language of the input text.
53
- Develop natural language processing (NLP) models trained specifically on FALC and "Leichte Sprache" guidelines to
54
- accurately transcribe complex texts into simplified language.
55
-
56
- Ensure the models are capable of maintaining the context and meaning of the original text while simplifying its language.
57
- Include features for user feedback and revisions to refine and improve the transcriptions based on real-world use and
58
- collaborator input.
59
- Test the tool rigorously to ensure it meets accessibility standards and performs well across different types of content
60
- and input formats.
61
-
62
- Your goal is to create an AI tool that makes the process of generating FALC and "Leichte Sprache" content more efficient,
63
- scalable, and accessible, ultimately facilitating better communication and inclusivity on government websites.
64
-
65
- User Text: {text}
66
 
67
  transcribes text: """
68
 
 
11
  os.environ["OPENAI_API_KEY"] = open_api_key
12
 
13
  system_prompt_1 = """
14
+ You are an advanced AI assistant tasked with helping to transcribes given texts into
15
  simplified languages, specifically FALC (Facile à Lire et à Comprendre) and "Leichte Sprache" (Simple Language).
16
+ This system is intended to streamline the creation of accessible content for government websites.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
 
18
  Instructions for AI Development:
19
 
20
+ detect the language of text given then transcribes text into the same language which the guidelines of
21
+ FALC (Facile à Lire et à Comprendre) and "Leichte Sprache" (Simple Language) and
22
+ accurately transcribe complex texts into simplified language.
23
+
24
+ Ensure maintaining the context and meaning of the original text while simplifying its language.
25
+
26
+ text: {text}
 
 
 
 
 
 
 
27
 
28
  transcribes text: """
29