Nick088 commited on
Commit
59bd80e
·
verified ·
1 Parent(s): 07bb887

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -14,11 +14,10 @@ def generate(
14
  top_k,
15
  random_seed,
16
  seed,
17
- model_path="roborovski/superprompt-v1",
18
- dtype="fp16",
19
  ):
20
  tokenizer = T5Tokenizer.from_pretrained("google/flan-t5-small")
21
- model = T5ForConditionalGeneration.from_pretrained(model_path, torch_dtype=dtype)
22
 
23
  if torch.cuda.is_available():
24
  device = "cuda"
@@ -128,8 +127,7 @@ examples = [
128
  50,
129
  False,
130
  42,
131
- "roborovski/superprompt-v1",
132
- "fp16",
133
  ]
134
  ]
135
 
 
14
  top_k,
15
  random_seed,
16
  seed,
17
+ precision=torch.float16,
 
18
  ):
19
  tokenizer = T5Tokenizer.from_pretrained("google/flan-t5-small")
20
+ model = T5ForConditionalGeneration.from_pretrained("roborovski/superprompt-v1", torch_dtype=precision)
21
 
22
  if torch.cuda.is_available():
23
  device = "cuda"
 
127
  50,
128
  False,
129
  42,
130
+ torch.float16,
 
131
  ]
132
  ]
133