Update app.py
Browse files
app.py
CHANGED
@@ -47,7 +47,7 @@ def inference(audio):
|
|
47 |
# Added prompt two 2 lines below
|
48 |
prompt = "The following is a transcript of someone talking, please predict what they will say next. \n"
|
49 |
### code
|
50 |
-
input_ids = tokenizer(result.text, return_tensors="pt").input_ids
|
51 |
print("inputs ", input_ids)
|
52 |
|
53 |
# prompt length
|
@@ -87,7 +87,7 @@ def inference(audio):
|
|
87 |
# print audio data as text
|
88 |
# print(result.text)
|
89 |
# prompt
|
90 |
-
getText = generator(
|
91 |
# pprint("getText: ", getText)
|
92 |
# pprint("text.result: ", result.text)
|
93 |
# result.text
|
|
|
47 |
# Added prompt two 2 lines below
|
48 |
prompt = "The following is a transcript of someone talking, please predict what they will say next. \n"
|
49 |
### code
|
50 |
+
input_ids = tokenizer(prompt, result.text, return_tensors="pt").input_ids
|
51 |
print("inputs ", input_ids)
|
52 |
|
53 |
# prompt length
|
|
|
87 |
# print audio data as text
|
88 |
# print(result.text)
|
89 |
# prompt
|
90 |
+
getText = generator(result.text, max_new_tokens=10, num_return_sequences=5)
|
91 |
# pprint("getText: ", getText)
|
92 |
# pprint("text.result: ", result.text)
|
93 |
# result.text
|