Spaces:
Running
Running
Commit
·
263b331
1
Parent(s):
98d8559
adding logs
Browse files
main.py
CHANGED
@@ -124,6 +124,8 @@ def predict(data: PredictRequest):
|
|
124 |
dict: The generated description of the image(s).
|
125 |
"""
|
126 |
|
|
|
|
|
127 |
# Ensure image_base64 is a list (even if a single image is provided)
|
128 |
image_list = (
|
129 |
data.image_base64
|
@@ -156,6 +158,8 @@ def predict(data: PredictRequest):
|
|
156 |
return_tensors="pt",
|
157 |
).to(model.device)
|
158 |
|
|
|
|
|
159 |
# Generate the output
|
160 |
generated_ids = model.generate(**inputs, max_new_tokens=2056)
|
161 |
generated_ids_trimmed = [
|
|
|
124 |
dict: The generated description of the image(s).
|
125 |
"""
|
126 |
|
127 |
+
print("Calling /predict endpoint...")
|
128 |
+
|
129 |
# Ensure image_base64 is a list (even if a single image is provided)
|
130 |
image_list = (
|
131 |
data.image_base64
|
|
|
158 |
return_tensors="pt",
|
159 |
).to(model.device)
|
160 |
|
161 |
+
print("Starting generation...")
|
162 |
+
|
163 |
# Generate the output
|
164 |
generated_ids = model.generate(**inputs, max_new_tokens=2056)
|
165 |
generated_ids_trimmed = [
|