charliebaby2023 commited on
Commit
c1158cf
·
verified ·
1 Parent(s): 2fb46eb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -9
app.py CHANGED
@@ -1,13 +1,4 @@
1
  import gradio as gr
2
- from handle_models import load_fn,infer,gen_fn
3
- from all_models import models
4
- from externalmod import gr_Interface_load, save_image, randomize_seed
5
- import asyncio
6
- import os
7
- from threading import RLock
8
- from datetime import datetime
9
- from handlemodelradio import extend_choices,update_imgbox,random_choices
10
- #anything but huggingface_hub==0.26.2 will result in token error
11
  from huggingface_hub import HfApi, whoami
12
  howManyModelsToUse = 20
13
  num_models = howManyModelsToUse
@@ -24,6 +15,15 @@ HF_TOKEN = os.environ.get("HF_TOKEN") if os.environ.get("HF_TOKEN") else None #
24
  api = HfApi()
25
  user_info = whoami(token=HF_TOKEN)
26
  username = user_info["name"]
 
 
 
 
 
 
 
 
 
27
  # Get all models owned by the user
28
  #models = api.list_models(author=username, token=HF_TOKEN)
29
  mymodels = list(api.list_models(author=username, token=HF_TOKEN))
 
1
  import gradio as gr
 
 
 
 
 
 
 
 
 
2
  from huggingface_hub import HfApi, whoami
3
  howManyModelsToUse = 20
4
  num_models = howManyModelsToUse
 
15
  api = HfApi()
16
  user_info = whoami(token=HF_TOKEN)
17
  username = user_info["name"]
18
+ from handle_models import load_fn,infer,gen_fn
19
+ from all_models import models
20
+ from externalmod import gr_Interface_load, save_image, randomize_seed
21
+ import asyncio
22
+ import os
23
+ from threading import RLock
24
+ from datetime import datetime
25
+ from handlemodelradio import extend_choices,update_imgbox,random_choices
26
+ #anything but huggingface_hub==0.26.2 will result in token error
27
  # Get all models owned by the user
28
  #models = api.list_models(author=username, token=HF_TOKEN)
29
  mymodels = list(api.list_models(author=username, token=HF_TOKEN))