Update app.py
Browse files
app.py
CHANGED
@@ -17,7 +17,7 @@ model = AutoModelForCausalLM.from_pretrained( model_path)
|
|
17 |
|
18 |
device = 'cpu' # 'cuda'
|
19 |
@spaces.GPU
|
20 |
-
def generate_text(prompt, temperature=0.9, max_length=
|
21 |
# Encode the inputs
|
22 |
inputs = tokenizer.encode(prompt, return_tensors="pt")
|
23 |
attention_mask = torch.ones(inputs.shape, dtype=torch.long)
|
|
|
17 |
|
18 |
device = 'cpu' # 'cuda'
|
19 |
@spaces.GPU
|
20 |
+
def generate_text(prompt, temperature=0.9, max_length=200):
|
21 |
# Encode the inputs
|
22 |
inputs = tokenizer.encode(prompt, return_tensors="pt")
|
23 |
attention_mask = torch.ones(inputs.shape, dtype=torch.long)
|