myopera9 commited on
Commit
904629e
·
verified ·
1 Parent(s): 00c7db2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -13
app.py CHANGED
@@ -29,18 +29,6 @@ def auth(user_name, password):
29
  else:
30
  return False # 認証失敗
31
 
32
- def list_private_models(profile: gr.OAuthProfile | None, oauth_token: gr.OAuthToken | None) -> str:
33
- # ^ expect a gr.OAuthToken object as input to get the user's token
34
- # if the user is not logged in, oauth_token will be None
35
- gr.Textbox(oauth_token)
36
- if oauth_token is None:
37
- return "Please log in to list private models."
38
- models = [
39
- f"{model.id} ({'private' if model.private else 'public'})"
40
- for model in list_models(author=profile.username, token=oauth_token.token)
41
- ]
42
- return "Models:\n\n" + "\n - ".join(models) + "."
43
-
44
  def login(user_name, password):
45
  global logged_in
46
  sqlcmd = "https://www.ryhintl.com/dbjson/getjson?sqlcmd=select count(customername) as auth from llm_acl where customername = '"+user_name+"' and customerkey = '"+password+"'"
@@ -386,6 +374,6 @@ with gr.Blocks(css=load_css(),js=js) as llm:
386
 
387
  #log_out_button.click(fn=log_out, inputs=None, outputs=output)
388
 
389
- llm.launch(auth=list_private_models,share=True)
390
 
391
 
 
29
  else:
30
  return False # 認証失敗
31
 
 
 
 
 
 
 
 
 
 
 
 
 
32
  def login(user_name, password):
33
  global logged_in
34
  sqlcmd = "https://www.ryhintl.com/dbjson/getjson?sqlcmd=select count(customername) as auth from llm_acl where customername = '"+user_name+"' and customerkey = '"+password+"'"
 
374
 
375
  #log_out_button.click(fn=log_out, inputs=None, outputs=output)
376
 
377
+ llm.launch(share=True)
378
 
379