Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -34,15 +34,15 @@ def get_caption(image_in):
|
|
| 34 |
print(full_sentence)
|
| 35 |
|
| 36 |
# Find the last occurrence of "."
|
| 37 |
-
last_period_index = full_sentence.rfind('.')
|
| 38 |
|
| 39 |
# Truncate the string up to the last period
|
| 40 |
-
truncated_caption = full_sentence[:last_period_index + 1]
|
| 41 |
|
| 42 |
# print(truncated_caption)
|
| 43 |
-
print(f"\n—\nIMAGE CAPTION: {truncated_caption}")
|
| 44 |
|
| 45 |
-
return
|
| 46 |
|
| 47 |
import re
|
| 48 |
import torch
|
|
|
|
| 34 |
print(full_sentence)
|
| 35 |
|
| 36 |
# Find the last occurrence of "."
|
| 37 |
+
#last_period_index = full_sentence.rfind('.')
|
| 38 |
|
| 39 |
# Truncate the string up to the last period
|
| 40 |
+
#truncated_caption = full_sentence[:last_period_index + 1]
|
| 41 |
|
| 42 |
# print(truncated_caption)
|
| 43 |
+
#print(f"\n—\nIMAGE CAPTION: {truncated_caption}")
|
| 44 |
|
| 45 |
+
return full_sentence
|
| 46 |
|
| 47 |
import re
|
| 48 |
import torch
|