wzuidema
commited on
Commit
•
2f8bace
1
Parent(s):
701f333
removed second slider
Browse files
app.py
CHANGED
@@ -273,10 +273,10 @@ hila = gradio.Interface(
|
|
273 |
inputs=["text", layer_slider],
|
274 |
outputs="html",
|
275 |
)
|
276 |
-
layer_slider2 = gradio.Slider(minimum=0, maximum=12, value=0, step=1, label="Select IG layer")
|
277 |
lig = gradio.Interface(
|
278 |
fn=sentence_sentiment,
|
279 |
-
inputs=["text",
|
280 |
outputs="html",
|
281 |
)
|
282 |
|
@@ -298,27 +298,27 @@ Two key methods for Transformers are "attention rollout" (Abnar & Zuidema, 2020)
|
|
298 |
examples=[
|
299 |
[
|
300 |
"This movie was the best movie I have ever seen! some scenes were ridiculous, but acting was great",
|
301 |
-
8
|
302 |
],
|
303 |
[
|
304 |
"I really didn't like this movie. Some of the actors were good, but overall the movie was boring",
|
305 |
-
8
|
306 |
],
|
307 |
[
|
308 |
"If the acting had been better, this movie might have been pretty good.",
|
309 |
-
8
|
310 |
],
|
311 |
[
|
312 |
"If he had hated it, he would not have said that he loved it.",
|
313 |
-
8
|
314 |
],
|
315 |
[
|
316 |
"If he had hated it, he would not have said that he loved it.",
|
317 |
-
8
|
318 |
],
|
319 |
[
|
320 |
"Attribution methods are very interesting, but unfortunately do not work reliably out of the box.",
|
321 |
-
8
|
322 |
]
|
323 |
],
|
324 |
)
|
|
|
273 |
inputs=["text", layer_slider],
|
274 |
outputs="html",
|
275 |
)
|
276 |
+
# layer_slider2 = gradio.Slider(minimum=0, maximum=12, value=0, step=1, label="Select IG layer")
|
277 |
lig = gradio.Interface(
|
278 |
fn=sentence_sentiment,
|
279 |
+
inputs=["text", layer_slider],
|
280 |
outputs="html",
|
281 |
)
|
282 |
|
|
|
298 |
examples=[
|
299 |
[
|
300 |
"This movie was the best movie I have ever seen! some scenes were ridiculous, but acting was great",
|
301 |
+
8
|
302 |
],
|
303 |
[
|
304 |
"I really didn't like this movie. Some of the actors were good, but overall the movie was boring",
|
305 |
+
8
|
306 |
],
|
307 |
[
|
308 |
"If the acting had been better, this movie might have been pretty good.",
|
309 |
+
8
|
310 |
],
|
311 |
[
|
312 |
"If he had hated it, he would not have said that he loved it.",
|
313 |
+
8
|
314 |
],
|
315 |
[
|
316 |
"If he had hated it, he would not have said that he loved it.",
|
317 |
+
8
|
318 |
],
|
319 |
[
|
320 |
"Attribution methods are very interesting, but unfortunately do not work reliably out of the box.",
|
321 |
+
8
|
322 |
]
|
323 |
],
|
324 |
)
|