Spaces:
Running
Running
improve data
Browse files
app.py
CHANGED
@@ -53,9 +53,9 @@ async def ppt_content(data):
|
|
53 |
"3. Bullet point: A list of bullet points summarizing key information on the slide. Each bullet point should be detail, long, and highlight a specific aspect of the slide's topic. ideally, limit to 3-5 points.",
|
54 |
"4. Image Suggestion: A prompt for generating an image to complement the slide content. Describe the desired visual in detail, including elements, style, and relevance to the topic. Ensure the prompt is actionable for AI tools.",
|
55 |
))
|
56 |
-
listOfString = split_long_string(data)
|
57 |
-
for i, chunk in enumerate(listOfString):
|
58 |
-
|
59 |
|
60 |
# for x in listOfString:
|
61 |
# result: RunResult[str] = RunResult(_all_messages:[])
|
@@ -63,8 +63,7 @@ async def ppt_content(data):
|
|
63 |
|
64 |
|
65 |
|
66 |
-
result_1 = agent.run_sync(user_prompt =
|
67 |
-
#result_2 = agent.run_sync(user_prompt = listOfString[1],message_history=result_1.new_messages())
|
68 |
|
69 |
print(result_1.data)
|
70 |
|
@@ -74,7 +73,6 @@ def ai_ppt(data):
|
|
74 |
summary = summarizer(data, max_length=400, min_length=100, truncation=True)
|
75 |
|
76 |
summary_texts = [item['summary_text'] for item in summary]
|
77 |
-
print(summary_texts)
|
78 |
asyncio.run(ppt_content(data=summary_texts))
|
79 |
|
80 |
|
|
|
53 |
"3. Bullet point: A list of bullet points summarizing key information on the slide. Each bullet point should be detail, long, and highlight a specific aspect of the slide's topic. ideally, limit to 3-5 points.",
|
54 |
"4. Image Suggestion: A prompt for generating an image to complement the slide content. Describe the desired visual in detail, including elements, style, and relevance to the topic. Ensure the prompt is actionable for AI tools.",
|
55 |
))
|
56 |
+
# listOfString = split_long_string(data)
|
57 |
+
# for i, chunk in enumerate(listOfString):
|
58 |
+
# print(f"Chunk {i}:\n{chunk}\n")
|
59 |
|
60 |
# for x in listOfString:
|
61 |
# result: RunResult[str] = RunResult(_all_messages:[])
|
|
|
63 |
|
64 |
|
65 |
|
66 |
+
result_1 = agent.run_sync(user_prompt = "".join(data))
|
|
|
67 |
|
68 |
print(result_1.data)
|
69 |
|
|
|
73 |
summary = summarizer(data, max_length=400, min_length=100, truncation=True)
|
74 |
|
75 |
summary_texts = [item['summary_text'] for item in summary]
|
|
|
76 |
asyncio.run(ppt_content(data=summary_texts))
|
77 |
|
78 |
|