Spaces:
Sleeping
Sleeping
max limit set to 1024
Browse files
app.py
CHANGED
|
@@ -66,7 +66,7 @@ def predict_text(text):
|
|
| 66 |
# inputs = processor(image, input_text, return_tensors="pt").to(device)
|
| 67 |
inputs = processor(text=text, return_tensors="pt").to("cuda")
|
| 68 |
# Generate a response from the model
|
| 69 |
-
outputs = model.generate(**inputs, max_new_tokens=
|
| 70 |
|
| 71 |
# Decode the output to return the final response
|
| 72 |
response = processor.decode(outputs[0], skip_special_tokens=True)
|
|
|
|
| 66 |
# inputs = processor(image, input_text, return_tensors="pt").to(device)
|
| 67 |
inputs = processor(text=text, return_tensors="pt").to("cuda")
|
| 68 |
# Generate a response from the model
|
| 69 |
+
outputs = model.generate(**inputs, max_new_tokens=1024)
|
| 70 |
|
| 71 |
# Decode the output to return the final response
|
| 72 |
response = processor.decode(outputs[0], skip_special_tokens=True)
|