Spaces:
Running
Running
give supporting documents
Browse files
app.py
CHANGED
|
@@ -10,6 +10,7 @@ import pdfplumber
|
|
| 10 |
import os
|
| 11 |
import presentation as customClass
|
| 12 |
from streamlit_pdf_viewer import pdf_viewer
|
|
|
|
| 13 |
|
| 14 |
|
| 15 |
api_key = os.getenv("API_KEY")
|
|
@@ -37,14 +38,20 @@ def split_long_string(long_string, chunk_size=3500):
|
|
| 37 |
return chunks
|
| 38 |
|
| 39 |
def return_data() -> str:
|
|
|
|
| 40 |
return "".join(data)
|
| 41 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
|
| 43 |
async def ppt_content(data):
|
| 44 |
agent = Agent(model,
|
| 45 |
result_type=customClass.PPT,
|
|
|
|
| 46 |
tools=[
|
| 47 |
-
|
| 48 |
],
|
| 49 |
system_prompt=(
|
| 50 |
"You are an expert in making power-point perssentation",
|
|
|
|
| 10 |
import os
|
| 11 |
import presentation as customClass
|
| 12 |
from streamlit_pdf_viewer import pdf_viewer
|
| 13 |
+
from dataclasses import dataclass
|
| 14 |
|
| 15 |
|
| 16 |
api_key = os.getenv("API_KEY")
|
|
|
|
| 38 |
return chunks
|
| 39 |
|
| 40 |
def return_data() -> str:
|
| 41 |
+
print("".join(data))
|
| 42 |
return "".join(data)
|
| 43 |
|
| 44 |
+
@dataclass
|
| 45 |
+
class SupportDependencies:
|
| 46 |
+
db:str = return_data()
|
| 47 |
+
|
| 48 |
|
| 49 |
async def ppt_content(data):
|
| 50 |
agent = Agent(model,
|
| 51 |
result_type=customClass.PPT,
|
| 52 |
+
deps_type=SupportDependencies,
|
| 53 |
tools=[
|
| 54 |
+
return_data,
|
| 55 |
],
|
| 56 |
system_prompt=(
|
| 57 |
"You are an expert in making power-point perssentation",
|