fudii0921 commited on
Commit
7bb512b
Β·
verified Β·
1 Parent(s): fdb577f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -44,8 +44,7 @@ def list_private_models(profile: gr.OAuthProfile | None, oauth_token: gr.OAuthTo
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,10 +196,10 @@ def search(state,query: str):
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
 
44
  userinfo = f"名前: {profile.name}さん\nID: {profile.username}\nプロフゑむル: {profile.profile}"
45
  state.value["loginuser"] = userinfo
46
  #state.value["picture"] = profile.picture
47
+ state["picture"] = profile.picture
 
48
 
49
  print("pic:",state.value["picture"],profile.picture)
50
  print("login-user:",state.value["loginuser"],userinfo)
 
196
 
197
  # Gradio Blocks Interface
198
  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:
199
+ state = gr.State({
200
+ "picture": "",
201
  "score": 0
202
+ })
203
 
204
  gr.LoginButton()
205
  # ^ add a login button to the Space