Update presentation_assistant/presentation_assistant.py
Browse files
presentation_assistant/presentation_assistant.py
CHANGED
|
@@ -74,7 +74,7 @@ def generate_text2ppt_input_prompt(input_type, input_value, input_pages):
|
|
| 74 |
# Function to execute text2ppt
|
| 75 |
def text2ppt(token_key, input_prompt, input_theme):
|
| 76 |
output = query({"inputs": "You are a kind helpful PPT designer. "+input_prompt})
|
| 77 |
-
reply =
|
| 78 |
print(reply)
|
| 79 |
md_text = reply[4:] if reply[:3] == "---" else reply
|
| 80 |
md_text_list = md_text.split('\n')
|
|
@@ -134,6 +134,6 @@ def ppt2script(token_key, input_file, input_type):
|
|
| 134 |
input_prompt = header + text
|
| 135 |
|
| 136 |
output = query({"inputs": "You are a kind helpful PPT Assistant."+input_prompt})
|
| 137 |
-
reply =
|
| 138 |
|
| 139 |
return reply
|
|
|
|
| 74 |
# Function to execute text2ppt
|
| 75 |
def text2ppt(token_key, input_prompt, input_theme):
|
| 76 |
output = query({"inputs": "You are a kind helpful PPT designer. "+input_prompt})
|
| 77 |
+
reply = output[0]['generated_text'][len("You are a kind helpful PPT designer. "+input_prompt):]
|
| 78 |
print(reply)
|
| 79 |
md_text = reply[4:] if reply[:3] == "---" else reply
|
| 80 |
md_text_list = md_text.split('\n')
|
|
|
|
| 134 |
input_prompt = header + text
|
| 135 |
|
| 136 |
output = query({"inputs": "You are a kind helpful PPT Assistant."+input_prompt})
|
| 137 |
+
reply = output[0]['generated_text'][len("You are a kind helpful PPT Assistant."+input_prompt):]
|
| 138 |
|
| 139 |
return reply
|