Spaces:
Runtime error
Runtime error
chats-bug
commited on
Commit
·
2bcaca6
1
Parent(s):
e651c62
Fixed positional arguments
Browse files
app.py
CHANGED
|
@@ -45,11 +45,11 @@ def generate_captions(
|
|
| 45 |
image,
|
| 46 |
max_length,
|
| 47 |
num_captions,
|
| 48 |
-
temperature,
|
| 49 |
-
top_k,
|
| 50 |
-
top_p,
|
| 51 |
-
repetition_penalty,
|
| 52 |
-
diversity_penalty,
|
| 53 |
)
|
| 54 |
|
| 55 |
# Convert list to a single string separated by newlines.
|
|
|
|
| 45 |
image,
|
| 46 |
max_length,
|
| 47 |
num_captions,
|
| 48 |
+
temperature=temperature,
|
| 49 |
+
top_k=top_k,
|
| 50 |
+
top_p=top_p,
|
| 51 |
+
repetition_penalty=repetition_penalty,
|
| 52 |
+
diversity_penalty=diversity_penalty,
|
| 53 |
)
|
| 54 |
|
| 55 |
# Convert list to a single string separated by newlines.
|
model.py
CHANGED
|
@@ -74,6 +74,7 @@ class ImageCaptionModel:
|
|
| 74 |
|
| 75 |
return generated_caption[:num_captions]
|
| 76 |
|
|
|
|
| 77 |
class GitBaseCocoModel(ImageCaptionModel):
|
| 78 |
def __init__(self, device):
|
| 79 |
"""
|
|
|
|
| 74 |
|
| 75 |
return generated_caption[:num_captions]
|
| 76 |
|
| 77 |
+
|
| 78 |
class GitBaseCocoModel(ImageCaptionModel):
|
| 79 |
def __init__(self, device):
|
| 80 |
"""
|