Spaces:
Running
Running
peter szemraj
commited on
Commit
·
32c181d
1
Parent(s):
9ba1d56
update placeholder
Browse files
app.py
CHANGED
@@ -39,7 +39,9 @@ def generate_text(
|
|
39 |
str: the generated text
|
40 |
"""
|
41 |
global generator
|
42 |
-
|
|
|
|
|
43 |
st = time.perf_counter()
|
44 |
|
45 |
input_tokens = generator.tokenizer(prompt)
|
@@ -97,7 +99,7 @@ def get_parser():
|
|
97 |
default_prompt = """
|
98 |
Hello,
|
99 |
|
100 |
-
|
101 |
|
102 |
if __name__ == "__main__":
|
103 |
logging.info("\n\n\nStarting new instance of app.py")
|
|
|
39 |
str: the generated text
|
40 |
"""
|
41 |
global generator
|
42 |
+
if verbose:
|
43 |
+
logging.info(f"Generating text from prompt:\n\n{prompt}")
|
44 |
+
logging.info(f"params:\tmax_length={gen_length}, num_beams={num_beams}, no_repeat_ngram_size={no_repeat_ngram_size}, length_penalty={length_penalty}, repetition_penalty={repetition_penalty}, abs_max_length={abs_max_length}")
|
45 |
st = time.perf_counter()
|
46 |
|
47 |
input_tokens = generator.tokenizer(prompt)
|
|
|
99 |
default_prompt = """
|
100 |
Hello,
|
101 |
|
102 |
+
Following up on last's bubblegum shipment, I"""
|
103 |
|
104 |
if __name__ == "__main__":
|
105 |
logging.info("\n\n\nStarting new instance of app.py")
|