Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -730,13 +730,14 @@ if query:
|
|
730 |
df13['href'] = [f'https://pubmed.ncbi.nlm.nih.gov/?term={database_name}%5Bmh%5D+NOT+review%5Bpt%5D' \
|
731 |
'+AND+english%5Bla%5D+AND+hasabstract+AND+1990:2022%5Bdp%5D+AND+' + c for c in df13['text']]
|
732 |
df13['href2'] = [f'https://en.wikipedia.org/wiki/' + c for c in df13['text']]
|
|
|
733 |
assert isinstance(df13, object)
|
734 |
df13['database'] = database_name
|
735 |
|
736 |
# df11['name'] = [c for c in result['Approved name']]
|
737 |
|
738 |
# Create the treemap using `px.treemap`
|
739 |
-
fig = px.treemap(df13, path=[df13['text']], values=sizes, custom_data=['href', 'database', 'href2', 'text'],
|
740 |
hover_name=(df6.head(value_drug)['SIMILARITY']))
|
741 |
|
742 |
fig.update(layout_coloraxis_showscale=False)
|
@@ -747,6 +748,7 @@ if query:
|
|
747 |
texttemplate="<span style='font-family: Arial; font-size: 20px;'>%{customdata[3]}<br><br>"
|
748 |
"<a href='%{customdata[0]}'>PubMed"
|
749 |
"</a><br><br><a href='%{customdata[2]}'>Wikipedia"
|
|
|
750 |
"</span></a>")
|
751 |
fig.update_layout(uniformtext=dict(minsize=15), treemapcolorway=["Thistle"])
|
752 |
# # display the treemap in Streamlit
|
|
|
730 |
df13['href'] = [f'https://pubmed.ncbi.nlm.nih.gov/?term={database_name}%5Bmh%5D+NOT+review%5Bpt%5D' \
|
731 |
'+AND+english%5Bla%5D+AND+hasabstract+AND+1990:2022%5Bdp%5D+AND+' + c for c in df13['text']]
|
732 |
df13['href2'] = [f'https://en.wikipedia.org/wiki/' + c for c in df13['text']]
|
733 |
+
df13['href3'] = [f'https://beta.clinicaltrials.gov/search?distance=50&cond={database_name}&term={c}&viewType=Table' for c in df13['text']]
|
734 |
assert isinstance(df13, object)
|
735 |
df13['database'] = database_name
|
736 |
|
737 |
# df11['name'] = [c for c in result['Approved name']]
|
738 |
|
739 |
# Create the treemap using `px.treemap`
|
740 |
+
fig = px.treemap(df13, path=[df13['text']], values=sizes, custom_data=['href', 'database', 'href2', 'text', 'href3'],
|
741 |
hover_name=(df6.head(value_drug)['SIMILARITY']))
|
742 |
|
743 |
fig.update(layout_coloraxis_showscale=False)
|
|
|
748 |
texttemplate="<span style='font-family: Arial; font-size: 20px;'>%{customdata[3]}<br><br>"
|
749 |
"<a href='%{customdata[0]}'>PubMed"
|
750 |
"</a><br><br><a href='%{customdata[2]}'>Wikipedia"
|
751 |
+
"</span></a><br><a href='%{customdata[4]}'>ClinicalTrials.gov"
|
752 |
"</span></a>")
|
753 |
fig.update_layout(uniformtext=dict(minsize=15), treemapcolorway=["Thistle"])
|
754 |
# # display the treemap in Streamlit
|