K00B404 commited on
Commit
9dac1fa
1 Parent(s): b795818

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -8,16 +8,16 @@ from transformers import AutoTokenizer, AutoModelForSequenceClassification
8
  import torch
9
  from transformers import AutoModelForCausalLM, AutoTokenizer
10
 
11
- model_id = 'pip install accelerate'
12
- gr.load(f"models/{model_id}").launch()
13
  tokenizer = AutoTokenizer.from_pretrained(model_id)
14
 
15
  model = AutoModelForCausalLM.from_pretrained(model_id)
16
 
17
- text = "TinyPixel/Llama-2-7B-bf16-sharded"
18
- inputs = tokenizer(text, return_tensors="pt")
19
 
20
- outputs = model.generate(**inputs, max_new_tokens=20)
21
  print(tokenizer.decode(outputs[0], skip_special_tokens=True))
22
 
23
 
 
8
  import torch
9
  from transformers import AutoModelForCausalLM, AutoTokenizer
10
 
11
+ model_id = 'TinyPixel/Llama-2-7B-bf16-sharded'
12
+ #gr.load(f"models/{model_id}").launch()
13
  tokenizer = AutoTokenizer.from_pretrained(model_id)
14
 
15
  model = AutoModelForCausalLM.from_pretrained(model_id)
16
 
17
+ #text = "TinyPixel/Llama-2-7B-bf16-sharded"
18
+ #inputs = tokenizer(text, return_tensors="pt")
19
 
20
+ #outputs = model.generate(**inputs, max_new_tokens=20)
21
  print(tokenizer.decode(outputs[0], skip_special_tokens=True))
22
 
23