vpcom commited on
Commit
a57e2fb
·
1 Parent(s): c1d65f5

fix: global name

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -249,7 +249,8 @@ def vote(data: gr.LikeData):
249
 
250
  def hello(profile: gr.OAuthProfile | None) -> str:
251
  global USERNAME
252
- print(dir(profile))
 
253
  if profile is None:
254
  USERNAME = "guest"
255
  NAME = "guest"
@@ -268,11 +269,11 @@ with gr.Blocks(css=CSS) as demo:
268
  """
269
  )
270
  with gr.Row():
 
 
271
  with gr.Column():
272
  gr.LoginButton()
273
  #gr.LogoutButton()
274
- with gr.Column():
275
- gr.Markdown().attach_load_event(hello, None)
276
 
277
  chatbot.like(vote, None, None)
278
 
 
249
 
250
  def hello(profile: gr.OAuthProfile | None) -> str:
251
  global USERNAME
252
+ global NAME
253
+ #print(dir(profile))
254
  if profile is None:
255
  USERNAME = "guest"
256
  NAME = "guest"
 
269
  """
270
  )
271
  with gr.Row():
272
+ with gr.Column():
273
+ gr.Markdown().attach_load_event(hello, None)
274
  with gr.Column():
275
  gr.LoginButton()
276
  #gr.LogoutButton()
 
 
277
 
278
  chatbot.like(vote, None, None)
279