Update presentation_assistant/presentation_assistant.py
Browse files
presentation_assistant/presentation_assistant.py
CHANGED
|
@@ -76,9 +76,9 @@ def text2ppt(token_key, input_prompt, input_theme):
|
|
| 76 |
output = query({"inputs": "You are a kind helpful PPT designer. "+input_prompt,
|
| 77 |
"parameters": {
|
| 78 |
"return_full_text": True,
|
| 79 |
-
"max_new_tokens":
|
| 80 |
-
|
| 81 |
-
reply = output[0]['generated_text']
|
| 82 |
print(reply)
|
| 83 |
md_text = reply[4:] if reply[:3] == "---" else reply
|
| 84 |
md_text_list = md_text.split('\n')
|
|
@@ -140,8 +140,8 @@ def ppt2script(token_key, input_file, input_type):
|
|
| 140 |
output = query({"inputs": "You are a kind helpful PPT Assistant."+input_prompt,
|
| 141 |
"parameters": {
|
| 142 |
"return_full_text": True,
|
| 143 |
-
"max_new_tokens":
|
| 144 |
-
|
| 145 |
-
reply = output[0]['generated_text']
|
| 146 |
|
| 147 |
return reply
|
|
|
|
| 76 |
output = query({"inputs": "You are a kind helpful PPT designer. "+input_prompt,
|
| 77 |
"parameters": {
|
| 78 |
"return_full_text": True,
|
| 79 |
+
"max_new_tokens": 200}})
|
| 80 |
+
reply = output[0]['generated_text'][len("You are a kind helpful PPT designer. "+input_prompt):]
|
| 81 |
+
# reply = output[0]['generated_text']
|
| 82 |
print(reply)
|
| 83 |
md_text = reply[4:] if reply[:3] == "---" else reply
|
| 84 |
md_text_list = md_text.split('\n')
|
|
|
|
| 140 |
output = query({"inputs": "You are a kind helpful PPT Assistant."+input_prompt,
|
| 141 |
"parameters": {
|
| 142 |
"return_full_text": True,
|
| 143 |
+
"max_new_tokens": 200}})
|
| 144 |
+
reply = output[0]['generated_text'][len("You are a kind helpful PPT Assistant."+input_prompt):]
|
| 145 |
+
# reply = output[0]['generated_text']
|
| 146 |
|
| 147 |
return reply
|