TowerHamletsIncluson commited on
Commit
bea9964
·
verified ·
1 Parent(s): c33cc46

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +24 -0
app.py ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ import gradio as gr
3
+
4
+ def simplify_text(text, reading_age, symbolise):
5
+ simplified = f"Reading Age {reading_age}:
6
+
7
+ {text}" # Simulated simplification
8
+ if symbolise:
9
+ simplified += "\n\n[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(label="Paste your text here", lines=10),
16
+ gr.Slider(minimum=5, maximum=18, step=1, value=9, label="Target Reading Age"),
17
+ gr.Checkbox(label="Would you like to symbolise this using Widgit Online?")
18
+ ],
19
+ outputs="text",
20
+ title="Tower Hamlets Inclusive Text Simplifier",
21
+ description="Developed by Ben Annett, Tower Hamlets Learning Advisory Service. Please anonymise documents before uploading."
22
+ )
23
+
24
+ iface.launch()