Spaces:
Running
Running
Avijit Ghosh
commited on
Commit
•
2ec74bb
1
Parent(s):
5fbbee3
Added Applicable Models
Browse files
app.py
CHANGED
@@ -72,6 +72,7 @@ def showmodal(evt: gr.SelectData):
|
|
72 |
authormd = gr.Markdown("",visible=False)
|
73 |
tagsmd = gr.Markdown("",visible=False)
|
74 |
abstractmd = gr.Markdown("",visible=False)
|
|
|
75 |
datasetmd = gr.Markdown("",visible=False)
|
76 |
gallery = gr.Gallery([],visible=False)
|
77 |
if evt.index[1] == 5:
|
@@ -84,6 +85,12 @@ def showmodal(evt: gr.SelectData):
|
|
84 |
tagstr = ''.join(['<span class="tag">#'+tag+'</span> ' for tag in tags])
|
85 |
tagsmd = gr.Markdown(tagstr, visible=True)
|
86 |
|
|
|
|
|
|
|
|
|
|
|
|
|
87 |
titlemd = gr.Markdown('# ['+itemdic['Link']+']('+itemdic['URL']+')',visible=True)
|
88 |
|
89 |
if pd.notnull(itemdic['Authors']):
|
@@ -100,7 +107,7 @@ def showmodal(evt: gr.SelectData):
|
|
100 |
if len(screenshots) > 0:
|
101 |
gallery = gr.Gallery(screenshots, visible=True)
|
102 |
|
103 |
-
return [modal, titlemd, authormd, tagsmd, abstractmd, datasetmd, gallery]
|
104 |
|
105 |
with gr.Blocks(title = "Social Impact Measurement V2", css=custom_css) as demo: #theme=gr.themes.Soft(),
|
106 |
# create tabs for the app, moving the current table to one titled "rewardbench" and the benchmark_text to a tab called "About"
|
@@ -151,9 +158,10 @@ The following categories are high-level, non-exhaustive, and present a synthesis
|
|
151 |
authormd = gr.Markdown(visible=False)
|
152 |
tagsmd = gr.Markdown(visible=False)
|
153 |
abstractmd = gr.Markdown(visible=False)
|
|
|
154 |
datasetmd = gr.Markdown(visible=False)
|
155 |
gallery = gr.Gallery(visible=False)
|
156 |
-
table_filtered.select(showmodal, None, [modal, titlemd, authormd, tagsmd, abstractmd, datasetmd, gallery])
|
157 |
|
158 |
|
159 |
|
@@ -189,9 +197,10 @@ The following categories are high-level, non-exhaustive, and present a synthesis
|
|
189 |
authormd = gr.Markdown(visible=False)
|
190 |
tagsmd = gr.Markdown(visible=False)
|
191 |
abstractmd = gr.Markdown(visible=False)
|
|
|
192 |
datasetmd = gr.Markdown(visible=False)
|
193 |
gallery = gr.Gallery(visible=False)
|
194 |
-
table_filtered.select(showmodal, None, [modal, titlemd, authormd, tagsmd, abstractmd, datasetmd, gallery])
|
195 |
|
196 |
|
197 |
|
@@ -231,9 +240,10 @@ The following categories are high-level, non-exhaustive, and present a synthesis
|
|
231 |
authormd = gr.Markdown(visible=False)
|
232 |
tagsmd = gr.Markdown(visible=False)
|
233 |
abstractmd = gr.Markdown(visible=False)
|
|
|
234 |
datasetmd = gr.Markdown(visible=False)
|
235 |
gallery = gr.Gallery(visible=False)
|
236 |
-
table_filtered.select(showmodal, None, [modal, titlemd, authormd, tagsmd, abstractmd, datasetmd, gallery])
|
237 |
|
238 |
# with gr.TabItem("Financial Costs"):
|
239 |
# with gr.Row():
|
|
|
72 |
authormd = gr.Markdown("",visible=False)
|
73 |
tagsmd = gr.Markdown("",visible=False)
|
74 |
abstractmd = gr.Markdown("",visible=False)
|
75 |
+
modelsmd = gr.Markdown("",visible=False)
|
76 |
datasetmd = gr.Markdown("",visible=False)
|
77 |
gallery = gr.Gallery([],visible=False)
|
78 |
if evt.index[1] == 5:
|
|
|
85 |
tagstr = ''.join(['<span class="tag">#'+tag+'</span> ' for tag in tags])
|
86 |
tagsmd = gr.Markdown(tagstr, visible=True)
|
87 |
|
88 |
+
models = itemdic['Applicable Models']
|
89 |
+
if isinstance(models, list):
|
90 |
+
if len(models) > 0:
|
91 |
+
modelstr = '### Applicable Models: '+''.join(['<span class="tag">'+model+'</span> ' for model in models])
|
92 |
+
modelsmd = gr.Markdown(modelstr, visible=True)
|
93 |
+
|
94 |
titlemd = gr.Markdown('# ['+itemdic['Link']+']('+itemdic['URL']+')',visible=True)
|
95 |
|
96 |
if pd.notnull(itemdic['Authors']):
|
|
|
107 |
if len(screenshots) > 0:
|
108 |
gallery = gr.Gallery(screenshots, visible=True)
|
109 |
|
110 |
+
return [modal, titlemd, authormd, tagsmd, abstractmd, modelsmd, datasetmd, gallery]
|
111 |
|
112 |
with gr.Blocks(title = "Social Impact Measurement V2", css=custom_css) as demo: #theme=gr.themes.Soft(),
|
113 |
# create tabs for the app, moving the current table to one titled "rewardbench" and the benchmark_text to a tab called "About"
|
|
|
158 |
authormd = gr.Markdown(visible=False)
|
159 |
tagsmd = gr.Markdown(visible=False)
|
160 |
abstractmd = gr.Markdown(visible=False)
|
161 |
+
modelsmd = gr.Markdown(visible=False)
|
162 |
datasetmd = gr.Markdown(visible=False)
|
163 |
gallery = gr.Gallery(visible=False)
|
164 |
+
table_filtered.select(showmodal, None, [modal, titlemd, authormd, tagsmd, abstractmd, modelsmd, datasetmd, gallery])
|
165 |
|
166 |
|
167 |
|
|
|
197 |
authormd = gr.Markdown(visible=False)
|
198 |
tagsmd = gr.Markdown(visible=False)
|
199 |
abstractmd = gr.Markdown(visible=False)
|
200 |
+
modelsmd = gr.Markdown(visible=False)
|
201 |
datasetmd = gr.Markdown(visible=False)
|
202 |
gallery = gr.Gallery(visible=False)
|
203 |
+
table_filtered.select(showmodal, None, [modal, titlemd, authormd, tagsmd, abstractmd, modelsmd, datasetmd, gallery])
|
204 |
|
205 |
|
206 |
|
|
|
240 |
authormd = gr.Markdown(visible=False)
|
241 |
tagsmd = gr.Markdown(visible=False)
|
242 |
abstractmd = gr.Markdown(visible=False)
|
243 |
+
modelsmd = gr.Markdown(visible=False)
|
244 |
datasetmd = gr.Markdown(visible=False)
|
245 |
gallery = gr.Gallery(visible=False)
|
246 |
+
table_filtered.select(showmodal, None, [modal, titlemd, authormd, tagsmd, abstractmd, modelsmd, datasetmd, gallery])
|
247 |
|
248 |
# with gr.TabItem("Financial Costs"):
|
249 |
# with gr.Row():
|