bkoz commited on
Commit
6d028a6
1 Parent(s): 16bcc45
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -3,11 +3,12 @@
3
  #
4
  import spaces
5
  from diffusers import DiffusionPipeline
6
-
7
  import torch
8
  from transformers import pipeline
9
 
10
- pipe = pipeline("text-generation", "meta-llama/Meta-Llama-3-8B-Instruct", torch_dtype=torch.bfloat16, device_map="auto", use_auth_token=True)
 
11
  response = pipe(chat, max_new_tokens=512)
12
 
13
  pipe.to('cuda')
 
3
  #
4
  import spaces
5
  from diffusers import DiffusionPipeline
6
+ import os
7
  import torch
8
  from transformers import pipeline
9
 
10
+ token = os.getenv("HUGGINGFACE_API_TOKEN")
11
+ pipe = pipeline("text-generation", "meta-llama/Meta-Llama-3-8B-Instruct", torch_dtype=torch.bfloat16, device_map="auto", use_auth_token=token)
12
  response = pipe(chat, max_new_tokens=512)
13
 
14
  pipe.to('cuda')