TowerHamletsIncluson commited on
Commit
52ee7c0
·
verified ·
1 Parent(s): 0e6242f

Upload 4 files

Browse files
Files changed (4) hide show
  1. README.md +5 -11
  2. app.py +23 -0
  3. logo.png +2 -0
  4. requirements.txt +2 -0
README.md CHANGED
@@ -1,12 +1,6 @@
1
- ---
2
- title: Tower Hamlets Inclusive Text Simplifier
3
- emoji: 😻
4
- colorFrom: indigo
5
- colorTo: blue
6
- sdk: gradio
7
- sdk_version: 5.38.0
8
- app_file: app.py
9
- pinned: false
10
- ---
11
 
12
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
 
2
+ # Tower Hamlets Inclusive Text Simplifier
3
+
4
+ This tool simplifies text to a target reading age and optionally prepares it for symbolisation via Widgit Online. Developed by Ben Annett, Tower Hamlets Learning Advisory Service.
5
+
6
+ ⚠️ Please anonymise documents before use.
app.py ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ import gradio as gr
3
+ import docx
4
+ from datetime import datetime
5
+
6
+ def simplify_text(text, reading_age, symbolise):
7
+ simplified = f"Reading Age: {reading_age}\n\n{text}" # Placeholder
8
+ if symbolise:
9
+ simplified += "\n\n[Copy and paste this into Widgit Online to symbolise it.]"
10
+ return simplified
11
+
12
+ iface = gr.Interface(
13
+ fn=simplify_text,
14
+ inputs=[
15
+ gr.Textbox(lines=10, placeholder="Paste your text here...", label="Input Text"),
16
+ gr.Slider(5, 18, value=9, label="Target Reading Age"),
17
+ gr.Checkbox(label="Would you like to symbolise this text using Widgit Online?")
18
+ ],
19
+ outputs="text",
20
+ title="Tower Hamlets Inclusive Text Simplifier",
21
+ description="Developed by Ben Annett, Specialist Advisor for Assistive Technology and Inclusion, Tower Hamlets Learning Advisory Service. ⚠️ Please anonymise any documents before upload. This tool simplifies text for differentiated access and can export to Widgit Online."
22
+ )
23
+ iface.launch()
logo.png ADDED
requirements.txt ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ gradio
2
+ docx