Spaces:
Runtime error
Runtime error
PFEemp2024
commited on
Commit
·
de5d4b1
1
Parent(s):
86735c0
Fixing typeError highlitedText bug
Browse files
app.py
CHANGED
@@ -69,7 +69,7 @@ cache = set()
|
|
69 |
|
70 |
|
71 |
def generate_adversarial_example(dataset, attacker, text=None, label=None):
|
72 |
-
if not text :
|
73 |
if "agnews" in dataset.lower():
|
74 |
text, label = get_agnews_example()
|
75 |
elif "sst2" in dataset.lower():
|
@@ -79,7 +79,7 @@ def generate_adversarial_example(dataset, attacker, text=None, label=None):
|
|
79 |
# elif "yahoo" in dataset.lower():
|
80 |
# text, label = get_yahoo_example()
|
81 |
elif "imdb" in dataset.lower():
|
82 |
-
text, label = get_imdb_example()
|
83 |
|
84 |
cache.add(text)
|
85 |
|
|
|
69 |
|
70 |
|
71 |
def generate_adversarial_example(dataset, attacker, text=None, label=None):
|
72 |
+
"""if not text or text in cache:
|
73 |
if "agnews" in dataset.lower():
|
74 |
text, label = get_agnews_example()
|
75 |
elif "sst2" in dataset.lower():
|
|
|
79 |
# elif "yahoo" in dataset.lower():
|
80 |
# text, label = get_yahoo_example()
|
81 |
elif "imdb" in dataset.lower():
|
82 |
+
text, label = get_imdb_example()"""
|
83 |
|
84 |
cache.add(text)
|
85 |
|