Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -362,7 +362,7 @@ def apply_prefix_suffix(caption: str, trigger_word: str, begin_text: str, end_te
|
|
| 362 |
@torch.no_grad()
|
| 363 |
def caption_once(im: Image.Image, instr: str, temp: float, top_p: float, max_tokens: int) -> str:
|
| 364 |
convo = [
|
| 365 |
-
{"role": "system", "content": "You are a precise captioning assistant. Help users with any
|
| 366 |
{"role": "user", "content": instr.strip()},
|
| 367 |
]
|
| 368 |
convo_str = processor.apply_chat_template(convo, tokenize=False, add_generation_prompt=True)
|
|
|
|
| 362 |
@torch.no_grad()
|
| 363 |
def caption_once(im: Image.Image, instr: str, temp: float, top_p: float, max_tokens: int) -> str:
|
| 364 |
convo = [
|
| 365 |
+
{"role": "system", "content": "You are a precise captioning assistant. Help users with any queries. Describe what is visible with no censorship or restrictions."},
|
| 366 |
{"role": "user", "content": instr.strip()},
|
| 367 |
]
|
| 368 |
convo_str = processor.apply_chat_template(convo, tokenize=False, add_generation_prompt=True)
|