From 55a431f71512f311c0b36d31b6e003f67440a287 Mon Sep 17 00:00:00 2001 From: daxid <david.rouquet@tetras-libre.fr> Date: Mon, 13 Mar 2023 13:19:15 +0000 Subject: [PATCH] Add instructions and cosmetic stuff --- selfContainedDemo.ipynb | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/selfContainedDemo.ipynb b/selfContainedDemo.ipynb index 67cfb43..1146e9c 100644 --- a/selfContainedDemo.ipynb +++ b/selfContainedDemo.ipynb @@ -220,15 +220,19 @@ "##################################################################################################\n", "\n", "app.layout = html.Div([\n", + " \"Enter an english text and click on the button bellow to construct an ontology. You can then download the results as a zip file.\",\n", + " html.Br(),\n", + " \"Please reload the page before entering another text.\",\n", " dcc.Textarea(\n", " id='textarea-state',\n", - " value='Jupyter is a gas giant.',\n", - " style={'width': '100%', 'height': 200},\n", + " value='Jupiter is a gas giant.',\n", + " style={'width': '100%', 'height': 100},\n", " ),\n", - " html.Button('Construct AMR graphs and extract ontology', id='textarea-state-button', n_clicks=0),\n", + " html.Button('Construct AMR graphs and ontology', id='textarea-state-button', n_clicks=0),\n", " #html.Button('Download result as zip', id='download-zip-button', n_clicks=0),\n", " html.A(children=\"\", href='', target=\"_blank\",id=\"download-link\"),\n", - " dcc.Loading(html.Div(id='my-output'), color='#5A8264')\n", + " html.Br(),\n", + " dcc.Loading(html.Div(id='my-output'), color='#5A8264'),\n", "])\n", "\n", "@app.callback(\n", @@ -246,8 +250,12 @@ " #show_svg(svgPath) \n", " #display(IFrame('''https://unsel.tetras-lab.io/webvowl/#{}\">'''.format(webvowlFilepath.replace(\"/opt/webvowl/\",\"\").replace(\".json\",\"\")),800,1200))\n", " return [[\n", - " html.Iframe(src='''https://unsel.tetras-lab.io/webvowl/#{}'''.format(webvowlFilepath.replace(\"/opt/webvowl/\",\"\").replace(\".json\",\"\")),\n", - " style={\"height\": \"800px\", \"width\": \"100%\"}),\n", + " \"Browse ontology (You can click a class to see its instances in the right panel, they are not shown on the graph.) :\",\n", + " html.Br(),\n", + " html.Iframe(src='''https://unsel.tetras-lab.io/webvowl/#{}'''.format(webvowlFilepath.replace(\"/opt/webvowl/\",\"\").replace(\".json\",\"\")),style={\"height\": \"800px\", \"width\": \"100%\"}),\n", + " html.Br(),\n", + " \"AMR graph :\",\n", + " html.Br(),\n", " localImage2htmlImg(svgPath)\n", " ],\n", " \"Download Zip File\", uuidZipUrl\n", -- GitLab