Spaces:
Tonic
/
Running on Zero

Tonic commited on
Commit
5a2e45f
1 Parent(s): f4b9dcc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -20,7 +20,8 @@ if not hf_token:
20
 
21
  tokenizer = AutoTokenizer.from_pretrained(model_path)
22
  quantization_config = BitsAndBytesConfig(load_in_8bit=True)
23
- model = AutoModelForCausalLM.from_pretrained( model_path, quantization_config=quantization_config).to("cuda")
 
24
  @spaces.GPU
25
  def generate_text(prompt, temperature, max_length):
26
  inputs = tokenizer.encode(prompt, return_tensors="pt").to("cuda")
 
20
 
21
  tokenizer = AutoTokenizer.from_pretrained(model_path)
22
  quantization_config = BitsAndBytesConfig(load_in_8bit=True)
23
+ model = AutoModelForCausalLM.from_pretrained( model_path, quantization_config=quantization_config)
24
+
25
  @spaces.GPU
26
  def generate_text(prompt, temperature, max_length):
27
  inputs = tokenizer.encode(prompt, return_tensors="pt").to("cuda")