11"""Chat Control demo for Marimo."""
2+
23import marimo
34
4- __generated_with = "0.18.3"
5- app = marimo .App (
6- width = "full" ,
7- layout_file = "layouts/demo_chatcontrol.slides.json" ,
8- )
5+ __generated_with = "0.18.4"
6+ app = marimo .App (width = "full" )
97
108with app .setup :
11- # Initialization code that runs before all other cells
12- pass
9+ from dotenv import load_dotenv
10+ load_dotenv ()
1311
1412
1513@app .cell (hide_code = True )
@@ -25,7 +23,6 @@ def _(mo):
2523@app .cell
2624def _ ():
2725 import marimo as mo
28-
2926 return (mo ,)
3027
3128
@@ -146,7 +143,6 @@ class RelatedLiterature(pydantic.BaseModel, frozen=True):
146143
147144 topic : str = pydantic .Field (description = "Topic or title of the article on this." )
148145 link : str = pydantic .Field (description = "Link to the article." )
149-
150146 return (RelatedLiterature ,)
151147
152148
@@ -207,7 +203,7 @@ def _(mo):
207203
208204@app .cell
209205def _ (pprint , result ):
210- pprint (result ["QuestionAnswering" ][0 ])
206+ pprint (result ["QuestionAnswering" ]. qa_pairs [0 ])
211207 return
212208
213209
@@ -221,7 +217,7 @@ def _(mo):
221217
222218@app .cell
223219def _ (pprint , result ):
224- pprint (result ["QuestionAnswering" ][1 ])
220+ pprint (result ["QuestionAnswering" ]. qa_pairs [1 ])
225221 return
226222
227223
@@ -249,7 +245,7 @@ def _(mo):
249245
250246@app .cell
251247def _ (result ):
252- for article in result ["InformationExtraction" ]:
248+ for article in result ["InformationExtraction" ]. entities :
253249 print (article .topic )
254250 print (f"{ article .link } " )
255251 print ("#######" )
0 commit comments