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