Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -43,7 +43,9 @@ def list_private_models(profile: gr.OAuthProfile | None, oauth_token: gr.OAuthTo
|
|
| 43 |
#]
|
| 44 |
userinfo = f"εε: {profile.name}γγ\nID: {profile.username}\nγγγγ‘γ€γ«: {profile.profile}"
|
| 45 |
state.value["loginuser"] = userinfo
|
| 46 |
-
state.value["picture"] = profile.picture
|
|
|
|
|
|
|
| 47 |
|
| 48 |
print("pic:",state.value["picture"],profile.picture)
|
| 49 |
print("login-user:",state.value["loginuser"],userinfo)
|
|
@@ -195,10 +197,10 @@ def search(state,query: str):
|
|
| 195 |
|
| 196 |
# Gradio Blocks Interface
|
| 197 |
with gr.Blocks(css="footer {visibility: hidden;} .custom-image {width: 64px; height: 64px;} .custom-btn {width: 150px; height: 30px; background-color: lightblue; border-radius: 10px; font-size: 12px; color: #3C82F6;} #header {display: flex; justify-content: space-between; align-items: center; font-size: 24px; font-weight: bold;} #logo {width: 50px; height: 50px;}",title="Knowledge Utility",theme=gr.themes.Glass()) as ku:
|
| 198 |
-
state = gr.State({
|
| 199 |
"picture": "https://www.ryhintl.com/images/ryhlogo/ryhlogo.png",
|
| 200 |
"score": 0
|
| 201 |
-
})
|
| 202 |
|
| 203 |
gr.LoginButton()
|
| 204 |
# ^ add a login button to the Space
|
|
@@ -213,7 +215,7 @@ with gr.Blocks(css="footer {visibility: hidden;} .custom-image {width: 64px; hei
|
|
| 213 |
|
| 214 |
|
| 215 |
with gr.Sidebar(open=False):
|
| 216 |
-
|
| 217 |
gr.HTML("""
|
| 218 |
<!DOCTYPE html>
|
| 219 |
<html lang="ja">
|
|
|
|
| 43 |
#]
|
| 44 |
userinfo = f"εε: {profile.name}γγ\nID: {profile.username}\nγγγγ‘γ€γ«: {profile.profile}"
|
| 45 |
state.value["loginuser"] = userinfo
|
| 46 |
+
#state.value["picture"] = profile.picture
|
| 47 |
+
|
| 48 |
+
state = gr.State({"picture": profile.picture})
|
| 49 |
|
| 50 |
print("pic:",state.value["picture"],profile.picture)
|
| 51 |
print("login-user:",state.value["loginuser"],userinfo)
|
|
|
|
| 197 |
|
| 198 |
# Gradio Blocks Interface
|
| 199 |
with gr.Blocks(css="footer {visibility: hidden;} .custom-image {width: 64px; height: 64px;} .custom-btn {width: 150px; height: 30px; background-color: lightblue; border-radius: 10px; font-size: 12px; color: #3C82F6;} #header {display: flex; justify-content: space-between; align-items: center; font-size: 24px; font-weight: bold;} #logo {width: 50px; height: 50px;}",title="Knowledge Utility",theme=gr.themes.Glass()) as ku:
|
| 200 |
+
'''state = gr.State({
|
| 201 |
"picture": "https://www.ryhintl.com/images/ryhlogo/ryhlogo.png",
|
| 202 |
"score": 0
|
| 203 |
+
})'''
|
| 204 |
|
| 205 |
gr.LoginButton()
|
| 206 |
# ^ add a login button to the Space
|
|
|
|
| 215 |
|
| 216 |
|
| 217 |
with gr.Sidebar(open=False):
|
| 218 |
+
gr.Image(value=state.value["picture"], elem_classes=["custom-image"])
|
| 219 |
gr.HTML("""
|
| 220 |
<!DOCTYPE html>
|
| 221 |
<html lang="ja">
|