Spaces:
Running
Running
some more data customazisation
Browse files
app.py
CHANGED
@@ -17,6 +17,7 @@ from dataclasses import dataclass
|
|
17 |
api_key = os.getenv("API_KEY")
|
18 |
data = []
|
19 |
last_message = ''
|
|
|
20 |
|
21 |
|
22 |
|
@@ -32,7 +33,7 @@ model = GroqModel('llama-3.1-70b-versatile', api_key = api_key)
|
|
32 |
|
33 |
|
34 |
|
35 |
-
def split_into_token_chunks(text: str, max_tokens: int =
|
36 |
"""
|
37 |
Splits a long string into chunks of a specified maximum number of tokens (words).
|
38 |
|
@@ -86,9 +87,9 @@ async def ppt_content(data):
|
|
86 |
|
87 |
for x in listOfString:
|
88 |
result = agent.run_sync(user_prompt = f"Create me a powerpoint presentation {x}",message_history = message_history)
|
89 |
-
message_history = []
|
90 |
message_history = result.all_messages()
|
91 |
-
|
|
|
92 |
|
93 |
|
94 |
deps :SupportDependencies = SupportDependencies(db="".join(data))
|
|
|
17 |
api_key = os.getenv("API_KEY")
|
18 |
data = []
|
19 |
last_message = ''
|
20 |
+
result_data:list[customClass.PPT] = []
|
21 |
|
22 |
|
23 |
|
|
|
33 |
|
34 |
|
35 |
|
36 |
+
def split_into_token_chunks(text: str, max_tokens: int = 2500) -> list:
|
37 |
"""
|
38 |
Splits a long string into chunks of a specified maximum number of tokens (words).
|
39 |
|
|
|
87 |
|
88 |
for x in listOfString:
|
89 |
result = agent.run_sync(user_prompt = f"Create me a powerpoint presentation {x}",message_history = message_history)
|
|
|
90 |
message_history = result.all_messages()
|
91 |
+
result_data.append(result.data)
|
92 |
+
print(result_data[-1])
|
93 |
|
94 |
|
95 |
deps :SupportDependencies = SupportDependencies(db="".join(data))
|