Spaces:
Runtime error
Runtime error
clean repo
Browse files- README.md +1 -1
- app.py +4 -2
- gradio-4.14.0-py3-none-any.whl +0 -3
- happy.gif +0 -0
- pyproject.toml +0 -11
- requirements.txt +0 -1
- setup.cfg +0 -14
README.md
CHANGED
@@ -4,7 +4,7 @@ emoji: 🏆
|
|
4 |
colorFrom: pink
|
5 |
colorTo: pink
|
6 |
sdk: gradio
|
7 |
-
sdk_version: 4.
|
8 |
hf_oauth: true
|
9 |
hf_oauth_scopes:
|
10 |
- read-repos
|
|
|
4 |
colorFrom: pink
|
5 |
colorTo: pink
|
6 |
sdk: gradio
|
7 |
+
sdk_version: 4.16.0
|
8 |
hf_oauth: true
|
9 |
hf_oauth_scopes:
|
10 |
- read-repos
|
app.py
CHANGED
@@ -7,6 +7,7 @@ def hello(profile: gr.OAuthProfile | None) -> str:
|
|
7 |
return "I don't know you."
|
8 |
return f"Hello {profile.name}"
|
9 |
|
|
|
10 |
def list_private_models(profile: gr.OAuthProfile | None, oauth_token: gr.OAuthToken | None) -> str:
|
11 |
if oauth_token is None:
|
12 |
return "Please log in to list private models."
|
@@ -16,12 +17,13 @@ def list_private_models(profile: gr.OAuthProfile | None, oauth_token: gr.OAuthTo
|
|
16 |
]
|
17 |
return "Models:\n\n" + "\n - ".join(models) + "."
|
18 |
|
|
|
19 |
with gr.Blocks() as demo:
|
20 |
gr.Markdown(
|
21 |
-
"# Gradio OAuth Space\n\nThis Space is a demo for the
|
|
|
22 |
)
|
23 |
gr.LoginButton()
|
24 |
-
gr.LogoutButton()
|
25 |
m1 = gr.Markdown()
|
26 |
m2 = gr.Markdown()
|
27 |
demo.load(hello, inputs=None, outputs=m1)
|
|
|
7 |
return "I don't know you."
|
8 |
return f"Hello {profile.name}"
|
9 |
|
10 |
+
|
11 |
def list_private_models(profile: gr.OAuthProfile | None, oauth_token: gr.OAuthToken | None) -> str:
|
12 |
if oauth_token is None:
|
13 |
return "Please log in to list private models."
|
|
|
17 |
]
|
18 |
return "Models:\n\n" + "\n - ".join(models) + "."
|
19 |
|
20 |
+
|
21 |
with gr.Blocks() as demo:
|
22 |
gr.Markdown(
|
23 |
+
"# Gradio OAuth Space\n\nThis Space is a demo for the **Sign in with Hugging Face** feature. "
|
24 |
+
"Duplicate this Space to get started."
|
25 |
)
|
26 |
gr.LoginButton()
|
|
|
27 |
m1 = gr.Markdown()
|
28 |
m2 = gr.Markdown()
|
29 |
demo.load(hello, inputs=None, outputs=m1)
|
gradio-4.14.0-py3-none-any.whl
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:ffd7b08549c4600fa738bb1508ba6ea52ecb9a54cd6963ca6193954e6f451959
|
3 |
-
size 16466767
|
|
|
|
|
|
|
|
happy.gif
DELETED
Binary file (482 kB)
|
|
pyproject.toml
DELETED
@@ -1,11 +0,0 @@
|
|
1 |
-
[tool.black]
|
2 |
-
line-length = 119
|
3 |
-
target_version = ['py38', 'py39', 'py310']
|
4 |
-
preview = true
|
5 |
-
|
6 |
-
[tool.ruff]
|
7 |
-
select = ["E", "F", "I", "W"]
|
8 |
-
line-length = 119
|
9 |
-
|
10 |
-
[tool.ruff.isort]
|
11 |
-
lines-after-imports = 2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
requirements.txt
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
gradio @ https://huggingface.co/spaces/Wauplin/gradio-oauth-demo/resolve/main/gradio-4.14.0-py3-none-any.whl
|
|
|
|
setup.cfg
DELETED
@@ -1,14 +0,0 @@
|
|
1 |
-
[isort]
|
2 |
-
default_section = FIRSTPARTY
|
3 |
-
ensure_newline_before_comments = True
|
4 |
-
force_grid_wrap = 0
|
5 |
-
include_trailing_comma = True
|
6 |
-
line_length = 119
|
7 |
-
lines_after_imports = 2
|
8 |
-
multi_line_output = 3
|
9 |
-
use_parentheses = True
|
10 |
-
|
11 |
-
[flake8]
|
12 |
-
exclude = .git,__pycache__,old,build,dist,.venv*
|
13 |
-
ignore = B028, E203, E501, E741, W503
|
14 |
-
max-line-length = 119
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|