Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
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)
|
|
|
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")
|