Skip to content

Commit

Permalink
Merge pull request #10 from pyscal/viola_2
Browse files Browse the repository at this point in the history
Viola 2
  • Loading branch information
srmnitc authored Apr 6, 2023
2 parents 0ac1824 + 8d3ffeb commit 1466d11
Showing 1 changed file with 94 additions and 7 deletions.
101 changes: 94 additions & 7 deletions example_gui.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 12,
"id": "ba8b3a9a-2a16-4874-a04b-f02e2febbb0c",
"metadata": {
"tags": []
Expand All @@ -19,6 +19,7 @@
"source": [
"import ipywidgets as widgets\n",
"from ipywidgets import HBox, VBox, Layout\n",
"from IPython.display import IFrame\n",
"import numpy as np\n",
"import matplotlib.pyplot as plt\n",
"from IPython.display import display\n",
Expand Down Expand Up @@ -336,6 +337,35 @@
" out])\n"
]
},
{
"cell_type": "code",
"execution_count": 13,
"id": "8e255db1-ed91-460d-82ed-810278407b0f",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"text = \"pyscal-rdf uses the Computational Material Sample Ontology\"\n",
"onto_label = widgets.HTML(value = f\"<b><font color='#006064'>{text}</b>\") \n",
"\n",
"out_onto = widgets.Output(layout={'border': '1px solid black'})\n",
"onto_tab = VBox(children=[onto_label, out_onto])"
]
},
{
"cell_type": "code",
"execution_count": 17,
"id": "727826fd-c944-448b-bfa3-6c222a731ab6",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"with out_onto:\n",
" display(IFrame(src=\"https://service.tib.eu/webvowl/#iri=http://purls.helmholtz-metadaten.de/cmso/\", width='100%', height='500px'))"
]
},
{
"cell_type": "code",
"execution_count": 7,
Expand All @@ -350,7 +380,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 16,
"id": "d7abf947-17a4-4308-a69d-32fdc5bba567",
"metadata": {
"tags": []
Expand All @@ -359,37 +389,94 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "7066e1fd9f9a492d811ae86012437eb1",
"model_id": "bd2b5dd3b048411481795bbc0e820cb7",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Tab(children=(HBox(children=(VBox(children=(HTML(value='<b>Create using element symbol</b>'), Dropdown(descrip"
"Tab(children=(HBox(children=(VBox(children=(HTML(value=\"<b><font color='#006064'>Create using element symbol</…"
]
},
"execution_count": 8,
"execution_count": 16,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#tab2 = VBox(children=[])\n",
"\n",
"tab = widgets.Tab(children=[element_tab, query_tab])\n",
"tab = widgets.Tab(children=[element_tab, query_tab, onto_tab])\n",
"tab.set_title(0, 'Structure Creation')\n",
"tab.set_title(1, 'Run Query')\n",
"tab.set_title(2, 'Ontology')\n",
"#VBox(children=[tab, run_button])\n",
"\n",
"tab"
]
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 10,
"id": "b128c289-9f76-42e2-9b0a-f5c28abc7ffc",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "5bfd98d2-d745-4e67-893c-64b1fbfc49c8",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "c55d6aae-72fd-45e2-a45e-5a91fd498377",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "43f7ca54-2847-4ae4-801f-d45c3741bd64",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "4205588c-2b94-4e91-becc-08cd23783b46",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "3926e79a-3a27-4108-ba2f-47e638cfda06",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "9ebe3267-0196-4106-b5ef-0f70bdbfc5fe",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "6b0cf2ac-f0b2-4f6d-afc4-e62f18820f6d",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down

0 comments on commit 1466d11

Please sign in to comment.