NithikaShree commited on
Commit
1a942ad
·
verified ·
1 Parent(s): 3687e6b

Create saver.py

Browse files
Files changed (1) hide show
  1. saver.py +10 -0
saver.py ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ from state import AgentState
3
+
4
+ def saver(state: AgentState):
5
+ os.makedirs("output", exist_ok=True)
6
+
7
+ with open("output/index.html", "w", encoding="utf-8") as f:
8
+ f.write(state["code"])
9
+
10
+ return state