Spaces:
Runtime error
Runtime error
Kieran Fraser
commited on
Commit
·
ae16b45
1
Parent(s):
66b3882
Updating with github buttons and gradio version
Browse filesSigned-off-by: Kieran Fraser <[email protected]>
- README.md +1 -1
- app.py +11 -13
- requirements.txt +1 -1
README.md
CHANGED
@@ -4,7 +4,7 @@ emoji: 🧪
|
|
4 |
colorFrom: red
|
5 |
colorTo: green
|
6 |
sdk: gradio
|
7 |
-
sdk_version: 4.
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
license: mit
|
|
|
4 |
colorFrom: red
|
5 |
colorTo: green
|
6 |
sdk: gradio
|
7 |
+
sdk_version: 4.16.0
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
license: mit
|
app.py
CHANGED
@@ -229,9 +229,7 @@ def show_params(type):
|
|
229 |
return gr.Column(visible=True)
|
230 |
return gr.Column(visible=False)
|
231 |
|
232 |
-
head = '''
|
233 |
-
<script async defer src="https://buttons.github.io/buttons.js"></script>
|
234 |
-
'''
|
235 |
|
236 |
# e.g. To use a local alternative theme: carbon_theme = Carbon()
|
237 |
carbon_theme = Carbon()
|
@@ -259,15 +257,18 @@ with gr.Blocks(css=css, head=head, theme='Tshackelton/IBMPlex-DenseReadable') as
|
|
259 |
<a href="https://github.com/Trusted-AI/adversarial-robustness-toolbox/blob/main/notebooks/hugging_face_poisoning.ipynb"
|
260 |
target="_blank">notebook</a>. Also feel free to contribute and give our repo a ⭐.</i></p>''')
|
261 |
|
262 |
-
gr.Markdown('''
|
263 |
-
|
264 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
265 |
|
266 |
gr.Markdown('''<hr/>''')
|
267 |
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
with gr.Row(elem_classes=["larger-gap", "custom-text"]):
|
272 |
with gr.Column(scale=1):
|
273 |
gr.Markdown('''<p style="font-size: 20px; text-align: justify">ℹ️ First lets set the scene. You have a dataset of images, such as Imagenette.</p>''')
|
@@ -328,9 +329,6 @@ with gr.Blocks(css=css, head=head, theme='Tshackelton/IBMPlex-DenseReadable') as
|
|
328 |
outputs=[clean_gallery, poison_gallery, clean_accuracy, poison_success])
|
329 |
|
330 |
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
gr.Markdown('''<br/>''')
|
335 |
|
336 |
if __name__ == "__main__":
|
@@ -343,4 +341,4 @@ if __name__ == "__main__":
|
|
343 |
max_threads=20)'''
|
344 |
|
345 |
# For deployment
|
346 |
-
demo.launch(
|
|
|
229 |
return gr.Column(visible=True)
|
230 |
return gr.Column(visible=False)
|
231 |
|
232 |
+
head = f'''<script async defer src="https://buttons.github.io/buttons.js"></script>'''
|
|
|
|
|
233 |
|
234 |
# e.g. To use a local alternative theme: carbon_theme = Carbon()
|
235 |
carbon_theme = Carbon()
|
|
|
257 |
<a href="https://github.com/Trusted-AI/adversarial-robustness-toolbox/blob/main/notebooks/hugging_face_poisoning.ipynb"
|
258 |
target="_blank">notebook</a>. Also feel free to contribute and give our repo a ⭐.</i></p>''')
|
259 |
|
260 |
+
gr.Markdown('''<div style="width: 100%; text-align: center;">
|
261 |
+
<a style="margin-right: 20px;" class="github-button"
|
262 |
+
href="https://github.com/Trusted-AI/adversarial-robustness-toolbox"
|
263 |
+
data-color-scheme="no-preference: light; light: light; dark: dark;" data-size="large"
|
264 |
+
data-show-count="true" aria-label="Star Trusted-AI/adversarial-robustness-toolbox on GitHub">Star</a>
|
265 |
+
<!-- Place this tag where you want the button to render. -->
|
266 |
+
<a class="github-button" href="https://github.com/Trusted-AI"
|
267 |
+
data-color-scheme="no-preference: light; light: light; dark: dark;" data-size="large" data-show-count="true"
|
268 |
+
aria-label="Follow @Trusted-AI on GitHub">Follow @Trusted-AI</a></div>''')
|
269 |
|
270 |
gr.Markdown('''<hr/>''')
|
271 |
|
|
|
|
|
|
|
272 |
with gr.Row(elem_classes=["larger-gap", "custom-text"]):
|
273 |
with gr.Column(scale=1):
|
274 |
gr.Markdown('''<p style="font-size: 20px; text-align: justify">ℹ️ First lets set the scene. You have a dataset of images, such as Imagenette.</p>''')
|
|
|
329 |
outputs=[clean_gallery, poison_gallery, clean_accuracy, poison_success])
|
330 |
|
331 |
|
|
|
|
|
|
|
332 |
gr.Markdown('''<br/>''')
|
333 |
|
334 |
if __name__ == "__main__":
|
|
|
341 |
max_threads=20)'''
|
342 |
|
343 |
# For deployment
|
344 |
+
demo.launch()
|
requirements.txt
CHANGED
@@ -7,4 +7,4 @@ tensorflow==2.10.1; sys_platform != "darwin"
|
|
7 |
tensorflow-macos; sys_platform == "darwin"
|
8 |
tensorflow-metal; sys_platform == "darwin"
|
9 |
adversarial-robustness-toolbox
|
10 |
-
gradio==4.
|
|
|
7 |
tensorflow-macos; sys_platform == "darwin"
|
8 |
tensorflow-metal; sys_platform == "darwin"
|
9 |
adversarial-robustness-toolbox
|
10 |
+
gradio==4.16
|