Lohia, Aditya
commited on
Commit
·
2c59c95
1
Parent(s):
4b91514
fix int issues
Browse files- app.py +2 -2
- gateway.py +1 -1
app.py
CHANGED
@@ -15,10 +15,10 @@ logging.basicConfig(level=logging.INFO)
|
|
15 |
|
16 |
# CONSTANTS
|
17 |
# Get max new tokens from environment variable, if it is not set, default to 2048
|
18 |
-
MAX_NEW_TOKENS: int = os.getenv("MAX_NEW_TOKENS", 2048)
|
19 |
|
20 |
# Get max number of images to be passed in the prompt
|
21 |
-
MAX_NUM_IMAGES: int = os.getenv("MAX_NUM_IMAGES")
|
22 |
if not MAX_NUM_IMAGES:
|
23 |
raise EnvironmentError("MAX_NUM_IMAGES is not set. Please set it to 1 or more.")
|
24 |
|
|
|
15 |
|
16 |
# CONSTANTS
|
17 |
# Get max new tokens from environment variable, if it is not set, default to 2048
|
18 |
+
MAX_NEW_TOKENS: int = int(os.getenv("MAX_NEW_TOKENS", 2048))
|
19 |
|
20 |
# Get max number of images to be passed in the prompt
|
21 |
+
MAX_NUM_IMAGES: int = int(os.getenv("MAX_NUM_IMAGES"))
|
22 |
if not MAX_NUM_IMAGES:
|
23 |
raise EnvironmentError("MAX_NUM_IMAGES is not set. Please set it to 1 or more.")
|
24 |
|
gateway.py
CHANGED
@@ -56,7 +56,7 @@ def request_generation(
|
|
56 |
json=payload,
|
57 |
verify=False,
|
58 |
)
|
59 |
-
|
60 |
response.raise_for_status()
|
61 |
|
62 |
# Append the conversation ID with the key X-Conversation-ID to the header
|
|
|
56 |
json=payload,
|
57 |
verify=False,
|
58 |
)
|
59 |
+
|
60 |
response.raise_for_status()
|
61 |
|
62 |
# Append the conversation ID with the key X-Conversation-ID to the header
|