Spaces:
Running
Running
Update app.py
#1
by
nroggendorff
- opened
app.py
CHANGED
@@ -13,7 +13,7 @@ else:
|
|
13 |
tokenizer = T5Tokenizer.from_pretrained("google/flan-t5-small")
|
14 |
|
15 |
def generate(prompt, model_precision_type, max_new_tokens, repetition_penalty, temperature, top_p, top_k, seed):
|
16 |
-
model = T5ForConditionalGeneration.from_pretrained("roborovski/superprompt-v1", device_map="auto", torch_dtype=
|
17 |
model.to(device)
|
18 |
|
19 |
input_text = f"Expand the following prompt to add more detail: {prompt}"
|
|
|
13 |
tokenizer = T5Tokenizer.from_pretrained("google/flan-t5-small")
|
14 |
|
15 |
def generate(prompt, model_precision_type, max_new_tokens, repetition_penalty, temperature, top_p, top_k, seed):
|
16 |
+
model = T5ForConditionalGeneration.from_pretrained("roborovski/superprompt-v1", device_map="auto", torch_dtype=torch.fp16)
|
17 |
model.to(device)
|
18 |
|
19 |
input_text = f"Expand the following prompt to add more detail: {prompt}"
|