Spaces:
Running
Running
annotation app code-17c78d56d3d1+git-c9b02cf-dirty
Browse files
app.py
CHANGED
|
@@ -57,7 +57,8 @@ def launch_kwargs(host=None, port=None) -> dict:
|
|
| 57 |
"show_api": False, # gradio 5: no API page
|
| 58 |
"footer_links": [], # gradio 6: no footer (API docs, settings, run-history links)
|
| 59 |
"run_history": False, # gradio 6: do not keep past runs in the browser
|
| 60 |
-
"max_file_size": 1024
|
|
|
|
| 61 |
if GRADIO_6:
|
| 62 |
kw.update(theme=theme(), css=CSS)
|
| 63 |
accepted = inspect.signature(gr.Blocks.launch).parameters
|
|
@@ -249,6 +250,10 @@ def build_demo(docs, config, out_dir: str | Path, meta: dict, layout: str = "hor
|
|
| 249 |
hardest.change(on_rank, [easiest, hardest], [gap_bm, gap_mw, s1_err], **EVENT)
|
| 250 |
s1_btn.click(on_s1, [easiest, hardest, gap_bm, gap_mw, state], ALL, **EVENT)
|
| 251 |
s2_btn.click(on_s2, [omits, contradicts, overgen, state], ALL, **EVENT)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 252 |
return demo
|
| 253 |
|
| 254 |
|
|
|
|
| 57 |
"show_api": False, # gradio 5: no API page
|
| 58 |
"footer_links": [], # gradio 6: no footer (API docs, settings, run-history links)
|
| 59 |
"run_history": False, # gradio 6: do not keep past runs in the browser
|
| 60 |
+
"max_file_size": 1024, # the app takes no files: refuse anonymous uploads to the upload route
|
| 61 |
+
"pwa": False} # no installable-app manifest (on by default on a Space)
|
| 62 |
if GRADIO_6:
|
| 63 |
kw.update(theme=theme(), css=CSS)
|
| 64 |
accepted = inspect.signature(gr.Blocks.launch).parameters
|
|
|
|
| 250 |
hardest.change(on_rank, [easiest, hardest], [gap_bm, gap_mw, s1_err], **EVENT)
|
| 251 |
s1_btn.click(on_s1, [easiest, hardest, gap_bm, gap_mw, state], ALL, **EVENT)
|
| 252 |
s2_btn.click(on_s2, [omits, contradicts, overgen, state], ALL, **EVENT)
|
| 253 |
+
# On a Space, gradio's page adds a Hugging Face header (Space name, owner avatar, likes) that also loads Google
|
| 254 |
+
# Fonts and calls the Hub API from the participant's browser. It names the account, so drop it: space_id is only
|
| 255 |
+
# used for that header and for API docs snippets (off here).
|
| 256 |
+
demo.space_id = None
|
| 257 |
return demo
|
| 258 |
|
| 259 |
|