hysts HF staff commited on
Commit
4b1ebb6
·
1 Parent(s): d047d88

Remove token

Browse files
Files changed (1) hide show
  1. app.py +1 -4
app.py CHANGED
@@ -42,8 +42,6 @@ ARTICLE = f'''## Generated images
42
  <center><img src="https://visitor-badge.glitch.me/badge?page_id=hysts.tadne" alt="visitor badge"/></center>
43
  '''
44
 
45
- TOKEN = os.environ['TOKEN']
46
-
47
 
48
  def parse_args() -> argparse.Namespace:
49
  parser = argparse.ArgumentParser()
@@ -62,8 +60,7 @@ def parse_args() -> argparse.Namespace:
62
  def load_model(device: torch.device) -> nn.Module:
63
  model = Generator(512, 1024, 4, channel_multiplier=2)
64
  path = hf_hub_download('hysts/TADNE',
65
- 'models/aydao-anime-danbooru2019s-512-5268480.pt',
66
- use_auth_token=TOKEN)
67
  checkpoint = torch.load(path)
68
  model.load_state_dict(checkpoint['g_ema'])
69
  model.eval()
 
42
  <center><img src="https://visitor-badge.glitch.me/badge?page_id=hysts.tadne" alt="visitor badge"/></center>
43
  '''
44
 
 
 
45
 
46
  def parse_args() -> argparse.Namespace:
47
  parser = argparse.ArgumentParser()
 
60
  def load_model(device: torch.device) -> nn.Module:
61
  model = Generator(512, 1024, 4, channel_multiplier=2)
62
  path = hf_hub_download('hysts/TADNE',
63
+ 'models/aydao-anime-danbooru2019s-512-5268480.pt')
 
64
  checkpoint = torch.load(path)
65
  model.load_state_dict(checkpoint['g_ema'])
66
  model.eval()