Update presentation_assistant/presentation_assistant.py
Browse files
presentation_assistant/presentation_assistant.py
CHANGED
@@ -78,7 +78,7 @@ def text2ppt(token_key, input_prompt, input_theme):
|
|
78 |
"return_full_text": False,
|
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')
|
@@ -147,6 +147,6 @@ def ppt2script(token_key, input_file, input_type):
|
|
147 |
"return_full_text": False,
|
148 |
"max_new_tokens": 200}})
|
149 |
# reply = output[0]['generated_text'][len("You are a kind helpful PPT Assistant."+input_prompt):]
|
150 |
-
reply = output[0]['generated_text']
|
151 |
|
152 |
return reply
|
|
|
78 |
"return_full_text": False,
|
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'].strip()
|
82 |
print(reply)
|
83 |
md_text = reply[4:] if reply[:3] == "---" else reply
|
84 |
md_text_list = md_text.split('\n')
|
|
|
147 |
"return_full_text": False,
|
148 |
"max_new_tokens": 200}})
|
149 |
# reply = output[0]['generated_text'][len("You are a kind helpful PPT Assistant."+input_prompt):]
|
150 |
+
reply = output[0]['generated_text'].strip()
|
151 |
|
152 |
return reply
|