Spaces:
Sleeping
Sleeping
Minor tweaks trying to debug.
Browse files
README.md
CHANGED
@@ -1,4 +1,3 @@
|
|
1 |
-
---
|
2 |
title: C Reviewer
|
3 |
emoji: ⚡
|
4 |
colorFrom: yellow
|
@@ -9,7 +8,4 @@ license: mit
|
|
9 |
hf_oauth: true
|
10 |
hf_oauth_expiration_minutes: 480
|
11 |
hf_oauth_scopes:
|
12 |
-
- email
|
13 |
-
---
|
14 |
-
|
15 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
|
1 |
title: C Reviewer
|
2 |
emoji: ⚡
|
3 |
colorFrom: yellow
|
|
|
8 |
hf_oauth: true
|
9 |
hf_oauth_expiration_minutes: 480
|
10 |
hf_oauth_scopes:
|
11 |
+
- email
|
|
|
|
|
|
main.py
CHANGED
@@ -18,7 +18,7 @@ app, rt = fast_app()
|
|
18 |
# @rt('/')
|
19 |
# def get(): return Div(P('Hello World!'), hx_get="/change")
|
20 |
|
21 |
-
|
22 |
"""
|
23 |
{
|
24 |
"imports": {
|
@@ -66,16 +66,17 @@ def get_hf_user_data():
|
|
66 |
|
67 |
@rt('/', methods="get")
|
68 |
def get():
|
69 |
-
header = Head(Title("
|
70 |
Script(src="https://unpkg.com/es-module-shims@1.7.0/dist/es-module-shims.js"),
|
71 |
-
Script(
|
72 |
)
|
73 |
content = Body(Div(P("Some content")),
|
|
|
74 |
Img(src="https://huggingface.co/datasets/huggingface/badges/resolve/main/sign-in-with-huggingface-xl-dark.svg",
|
75 |
alt="Sign in with Hugging Face",
|
76 |
style="cursor: pointer; display: none;",
|
77 |
-
_id = "signin"),
|
78 |
-
Button("Sign out",_id="signout", style="display: none"),
|
79 |
A("Authenticate!", href="authorized"),
|
80 |
Script(js_block_hf_auth, type="module"))
|
81 |
full_page = Html(header, content)
|
|
|
18 |
# @rt('/')
|
19 |
# def get(): return Div(P('Hello World!'), hx_get="/change")
|
20 |
|
21 |
+
js_hf_imports = \
|
22 |
"""
|
23 |
{
|
24 |
"imports": {
|
|
|
66 |
|
67 |
@rt('/', methods="get")
|
68 |
def get():
|
69 |
+
header = Head(Title("C code reviewing"),
|
70 |
Script(src="https://unpkg.com/es-module-shims@1.7.0/dist/es-module-shims.js"),
|
71 |
+
Script(js_hf_imports, type="importmap"),
|
72 |
)
|
73 |
content = Body(Div(P("Some content")),
|
74 |
+
Pre(""),
|
75 |
Img(src="https://huggingface.co/datasets/huggingface/badges/resolve/main/sign-in-with-huggingface-xl-dark.svg",
|
76 |
alt="Sign in with Hugging Face",
|
77 |
style="cursor: pointer; display: none;",
|
78 |
+
_id = "signin", name=None),
|
79 |
+
Button("Sign out",_id="signout", style="display: none", name=None),
|
80 |
A("Authenticate!", href="authorized"),
|
81 |
Script(js_block_hf_auth, type="module"))
|
82 |
full_page = Html(header, content)
|