Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -21,8 +21,8 @@ from transformers import (
|
|
21 |
from transformers.image_utils import load_image
|
22 |
|
23 |
# Constants for text generation
|
24 |
-
MAX_MAX_NEW_TOKENS =
|
25 |
-
DEFAULT_MAX_NEW_TOKENS =
|
26 |
MAX_INPUT_TOKEN_LENGTH = int(os.getenv("MAX_INPUT_TOKEN_LENGTH", "4096"))
|
27 |
|
28 |
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
|
|
|
21 |
from transformers.image_utils import load_image
|
22 |
|
23 |
# Constants for text generation
|
24 |
+
MAX_MAX_NEW_TOKENS = 2048
|
25 |
+
DEFAULT_MAX_NEW_TOKENS = 1024
|
26 |
MAX_INPUT_TOKEN_LENGTH = int(os.getenv("MAX_INPUT_TOKEN_LENGTH", "4096"))
|
27 |
|
28 |
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
|