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