Upload 4 files
Browse files
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 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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
|