Spaces:
Sleeping
Sleeping
jianuo
commited on
Commit
·
6ee67ba
1
Parent(s):
c94015f
test recover
Browse files- demo_watermark.py +1 -1
demo_watermark.py
CHANGED
@@ -271,7 +271,7 @@ def check_prompt(prompt, args, tokenizer, model=None, device=None):
|
|
271 |
int(truncation_warning),
|
272 |
args)
|
273 |
|
274 |
-
|
275 |
def generate(prompt, args, tokenizer, model=None, device=None):
|
276 |
"""根据水印参数实例化 WatermarkLogitsProcessor 并通过将其作为 logits 处理器传递给模型的 generate 方法来生成带水印的文本。"""
|
277 |
print(f"Generating with {args}")
|
|
|
271 |
int(truncation_warning),
|
272 |
args)
|
273 |
|
274 |
+
@spaces.GPU
|
275 |
def generate(prompt, args, tokenizer, model=None, device=None):
|
276 |
"""根据水印参数实例化 WatermarkLogitsProcessor 并通过将其作为 logits 处理器传递给模型的 generate 方法来生成带水印的文本。"""
|
277 |
print(f"Generating with {args}")
|