Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Fixup visible + spammign
Browse files- src/app.py +1 -1
- src/hub_utils.py +1 -1
src/app.py
CHANGED
@@ -107,7 +107,7 @@ with gr.Blocks() as demo:
|
|
107 |
api_name=False,
|
108 |
)
|
109 |
|
110 |
-
post_to_hub.click(lambda: gr.Button
|
111 |
report_results, inputs=[inp, library, access_token]
|
112 |
)
|
113 |
|
|
|
107 |
api_name=False,
|
108 |
)
|
109 |
|
110 |
+
post_to_hub.click(lambda: gr.Button(visible=False), outputs=post_to_hub, api_name=False).then(
|
111 |
report_results, inputs=[inp, library, access_token]
|
112 |
)
|
113 |
|
src/hub_utils.py
CHANGED
@@ -13,7 +13,7 @@ def check_for_discussion(model_name: str):
|
|
13 |
model_name = extract_from_url(model_name)
|
14 |
discussions = list(api.get_repo_discussions(model_name))
|
15 |
return any(
|
16 |
-
discussion.
|
17 |
for discussion in discussions
|
18 |
)
|
19 |
|
|
|
13 |
model_name = extract_from_url(model_name)
|
14 |
discussions = list(api.get_repo_discussions(model_name))
|
15 |
return any(
|
16 |
+
discussion.author == "model-sizer-bot"
|
17 |
for discussion in discussions
|
18 |
)
|
19 |
|