Spaces:
Sleeping
Sleeping
Fix prefix space
Browse files- app.py +2 -1
- requirements.txt +1 -0
app.py
CHANGED
@@ -16,7 +16,8 @@ def generate(tokenizer_id, num_tokens, prefix=None, source_text=None):
|
|
16 |
output_path = Path(f"prompt_{num_tokens}.jsonl")
|
17 |
if output_path.exists():
|
18 |
output_path.unlink()
|
19 |
-
|
|
|
20 |
prompt = generate_prompt(
|
21 |
tokenizer_id, int(num_tokens), prefix=prefix, source_text=source_text, output_file=output_path
|
22 |
)
|
|
|
16 |
output_path = Path(f"prompt_{num_tokens}.jsonl")
|
17 |
if output_path.exists():
|
18 |
output_path.unlink()
|
19 |
+
if prefix == "":
|
20 |
+
prefix = None
|
21 |
prompt = generate_prompt(
|
22 |
tokenizer_id, int(num_tokens), prefix=prefix, source_text=source_text, output_file=output_path
|
23 |
)
|
requirements.txt
CHANGED
@@ -1,3 +1,4 @@
|
|
1 |
transformers
|
2 |
sentencepiece
|
|
|
3 |
git+https://github.com/helena-intel/test-prompt-generator.git
|
|
|
1 |
transformers
|
2 |
sentencepiece
|
3 |
+
protobuf
|
4 |
git+https://github.com/helena-intel/test-prompt-generator.git
|