Spaces:
Sleeping
Sleeping
Avijit Ghosh
commited on
Commit
·
45cc3fa
1
Parent(s):
2711cd6
bugfix
Browse files
app.py
CHANGED
@@ -61,11 +61,14 @@ def showmodal(evt: gr.SelectData):
|
|
61 |
itemdic = metadata_dict[evt.value]
|
62 |
|
63 |
tags = itemdic['Hashtags']
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
|
|
|
|
|
|
69 |
|
70 |
titlemd = gr.Markdown('# ['+itemdic['Link']+']('+itemdic['URL']+')',visible=True)
|
71 |
|
@@ -73,8 +76,11 @@ def showmodal(evt: gr.SelectData):
|
|
73 |
authormd = gr.Markdown('## '+itemdic['Authors'],visible=True)
|
74 |
if pd.notnull(itemdic['Abstract']):
|
75 |
abstractmd = gr.Markdown(itemdic['Abstract'],visible=True)
|
76 |
-
|
77 |
-
|
|
|
|
|
|
|
78 |
return [modal, titlemd, authormd, tagsmd, abstractmd, gallery]
|
79 |
|
80 |
with gr.Blocks(title = "Social Impact Measurement V2", css=custom_css) as demo: #theme=gr.themes.Soft(),
|
|
|
61 |
itemdic = metadata_dict[evt.value]
|
62 |
|
63 |
tags = itemdic['Hashtags']
|
64 |
+
try:
|
65 |
+
pd.notnull(float(tags))
|
66 |
+
except:
|
67 |
+
if len(tags)>0:
|
68 |
+
tagstr = ''
|
69 |
+
for tag in tags:
|
70 |
+
tagstr += '<span class="tag">#'+tag+'</span> '
|
71 |
+
tagsmd = gr.Markdown(tagstr, visible=True)
|
72 |
|
73 |
titlemd = gr.Markdown('# ['+itemdic['Link']+']('+itemdic['URL']+')',visible=True)
|
74 |
|
|
|
76 |
authormd = gr.Markdown('## '+itemdic['Authors'],visible=True)
|
77 |
if pd.notnull(itemdic['Abstract']):
|
78 |
abstractmd = gr.Markdown(itemdic['Abstract'],visible=True)
|
79 |
+
try:
|
80 |
+
pd.notnull(float(itemdic['Screenshots']))
|
81 |
+
except:
|
82 |
+
if len(itemdic['Screenshots'])>0:
|
83 |
+
gallery = gr.Gallery(itemdic['Screenshots'],visible=True)
|
84 |
return [modal, titlemd, authormd, tagsmd, abstractmd, gallery]
|
85 |
|
86 |
with gr.Blocks(title = "Social Impact Measurement V2", css=custom_css) as demo: #theme=gr.themes.Soft(),
|