Update app.py
Browse files
app.py
CHANGED
@@ -132,7 +132,7 @@ After writing the document, please provide a list of sources with their URLs use
|
|
132 |
client = InferenceClient(model, token=huggingface_token)
|
133 |
|
134 |
# Calculate input tokens (this is an approximation, you might need a more accurate method)
|
135 |
-
input_tokens = len(prompt.split()) //
|
136 |
|
137 |
# Get the token limit for the current model
|
138 |
model_token_limit = MODEL_TOKEN_LIMITS.get(model, 8192) # Default to 8192 if model not found
|
|
|
132 |
client = InferenceClient(model, token=huggingface_token)
|
133 |
|
134 |
# Calculate input tokens (this is an approximation, you might need a more accurate method)
|
135 |
+
input_tokens = len(prompt.split()) // 4
|
136 |
|
137 |
# Get the token limit for the current model
|
138 |
model_token_limit = MODEL_TOKEN_LIMITS.get(model, 8192) # Default to 8192 if model not found
|